# Les fichiers bruts CR2 sont traités comme des fichiers TIFF

**URL:** <https://meta.discourse.org/t/cr2-raw-files-are-being-treated-as-tiff-files/96775>\
**Category:** Feature\
**Created:** [Septembre 9, 2018, 4:13 UTC](https://meta.discourse.org/t/cr2-raw-files-are-being-treated-as-tiff-files/96775 "2018-09-09T04:13:27Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [Septembre 9, 2018, 7:22 UTC](https://meta.discourse.org/t/cr2-raw-files-are-being-treated-as-tiff-files/96775/3 "2018-09-09T07:22:13Z")

</div>

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/](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/main/lib/file_helper.rb#L106>

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

> **[Comparison of web browsers | Image format support](https://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support)**
>
> Information about what image formats the browsers support. External links lead to information about support in future versions of the browsers or extensions that provide such functionality.

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

---

_[View the full topic](https://meta.discourse.org/t/cr2-raw-files-are-being-treated-as-tiff-files/96775)._
