I'm displaying images from outside my web root, like this:
The content-type: image/png is what confuses me.
Someone else helped me out with this code, but I noticed that not all images are PNG. Many are jpg or gif.
And still they are displayed successfully.
does anyone know why?
The best solution would be to read in the file, then decide which kind of image it is and send out the appropriate header
(Note: the correct content-type for JPG files is