The image is likely created using PHP's file_get_contents()
function. For example, the following PHP script will display the contents of myimage.jpg
to the browser, but the file could be called show-image.php
:
<?php
header("Content-Type: image/jpeg");
header("Content-Length: ".(string)(filesize('myimage.jpg')));
echo file_get_contents('myimage.jpg');
?>
As you can see, this is achieved by telling PHP to serve up the image/jpeg
MIME type.