CR2 raw files are being treated as tiff files

Raw file full on support is going to have to be plugin area. In general these files are 10-30 megs and dealing with them is quite a nightmare cause we would need http://www.cybercom.net/~dcoffin/dcraw/ in our image and in general even photographers do not like sharing raw files which are usually considered “my private blueprint”

That said…

We recently introduced a fix that looks at the actual contents of files prior to treating them as an image. This happened cause gravatar did not care about file extensions and would return jpegs as png so we went all atomic now and “coerce” images to correct file types.

raw files tend to “look” like tiff files cause they tend to use a tiff container. This does not really matter to us anyway cause the “image extension correction” should only apply to png/jpeg/gif… everything else really should be treated as attachments and not pass through file extension coercion.

I think we should narrow down “supported images” down here:

https://github.com/discourse/discourse/blob/master/lib/file_helper.rb#L106

tif / tiff / webp should be removed due to uneven browser support and simply treated as attachments. see:

Chrome has no support for tif, not-chrome has no support for webp.

9 Likes