Output an Image in PHP - Stack Overflow $file = '../image.jpg'; $type = 'image/jpeg'; header('Content-Type:'.$type); header(' Content-Length: ' . filesize($file)); readfile($file); ... If you have the liberty to ...
Output image to browser or file - PHP Output the image imagejpeg($im); // Free up memory imagedestroy($im); ?> The above example will output something similar to: Output of example : Outputting ...