Wikia/vignette — pull request #23 by nmonterroso (2014-10-01 16:28:18+00:00)
Title: Mime types

@drsnyder
We currently serve generated thumbnails with the mime type of the original. This has two problems:
1. If the original mime type is busted, any thumbnail created from that image won't be rendered correctly
2. If the format of the image changes during thumbnail generation (format=webp, for example), the image will be served with the incorrect mime type

This PR both of these issues. Serving originals with broken mime types still results in failed renders, though. This is because the s3 stream is partially consumed when figuring out the mime type, leaving whatever else needs to use the input stream without those initial bytes, and failing to render.