CR2 raw files are being treated as tiff files

This is just for tracking the issue. The bug is actually in fastimage and reported here:

Directly to the twitter discussion about the issue

If the bug is in fastimage then it is not a bug in Discourse…

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 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:

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.


I removed tiff and tif from the list and it actually works as we want. I
think I will patch that in our package for now.


Do we even need .bmp there while we are at it?


fastimage now skips raw files:

I asked for a release.


Really not sure, technically there is cross browser support, but yeah lightboxing a bmp makes little sense and I can no see any kind of scenario where you would want a bmp as a site asset (ico though we do render so I don’t want to play with the pipeline for it)


New release out fastimage | | your community gem host

removed my discourse-skip-tiff.patch and ran discourse with fastimage 2.1.4. Works nicely.

So can we get the changes for the 2.1.0 release?

  1. push fastimage 2.1.4 update
  2. removing tif* + bmp from the list

tif support is now dropped which is good and tif is simply treated same as cr2, as a binary which is attached.


This topic was automatically closed after 3 days. New replies are no longer allowed.