I am dynamically producing some charts using mod_python, inspng and .pdf formats. Whenever a user indicates /some/path/some_imagefile_title.png, I wish to show the look inside the browser, as with this url. I additionally want the look to become accessible from an HTML <img src=> tag.

To date, whenever I point my browser to some .png address from the server, the .png and .pdf are instantly downloaded rather than being seen. How must i fix this?

I labeled this under Apache, since i have figured it might be an Apache config factor. When not, please point me for the right direction.

Edit: Whoops, let alone... First, the right MIME type for .png is image/png not img/png, and 2nd, Chrome instantly downloads all .ebooks.

Seems like your python application is adding a Content-Disposition; attachment header when it shouldn't.