You simply set the header for the content type and output the reading file to the browser. What I am doing is creating a new php file, for example "showimage.php", which accepts an identifier or some so that I know which image to display. Then I use it on the browser page :.
In showimage.php something like:
<?php header('Content-type: image/png'); readfile('/var/images/' . $_GET['id'] . '.png');
This will read the file from the local system and output it as an image. On top of my head so I can ruin this code!
source share