how the browser or whatnot tells it is an image file is by the header. I know is is possible in php to dump the image, but not sure how to do it in python.
For example, if I did it in php, I could send a Header: image/jpeg and then output the content, the browser would see that it is a jpg...