How to show, not download, images in apache?
- by jawonlee
I'm dynamically generating some charts using mod_python, in .png and .pdf formats. When a user points to /some/path/some_imagefile_name.png, I want to show the image within the browser, like in this url. I also want the image to be accessible from an HTML <img src=> tag.
So far, whenever I point my browser to a .png address from my server, the .png and .pdf are automatically downloaded instead of being viewed. How should I fix this?
I tagged this under Apache, since I figured it would be an Apache config thing. If it's not, please point me towards the right direction.