How can I guess an image's mime type, in a cross-platform manner, and without any external libraries?
If you know in advance that you only need to handle a limited number of file formats you can use the imghdr.what function.
2.1m questions
2.1m answers
60 comments
57.0k users