How to show, not download, images in apache?
Posted
by jawonlee
on Stack Overflow
See other posts from Stack Overflow
or by jawonlee
Published on 2010-05-06T20:24:21Z
Indexed on
2010/05/06
20:28 UTC
Read the original article
Hit count: 196
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.
© Stack Overflow or respective owner