Good day!
Can you please tell me how to display a formatted image in the browser using PHP functions for working with imagejpeg()
image? In the JPG file, everything is perfectly displayed and subsequently correctly displayed, but for some reason the output to the file does not work. Actually, first output to the file:
imagejpeg($img,'file.jpg',100);
And in the browser:
header('Content-type: image/jpeg'); imagejpeg($img);
Bottom line: either nothing is displayed in the browser if the headers are not sent, or the image is in text form (which is also incorrect in general!). Help me please!
Thank!