Mailspring should preview small TIFF images along with JPEG, GIF, etc

inline tiff images (don’t make me start on why someone would ever want to include tiff images as inliners, as I do not get it either) are not showed in mailspring, while they are properly showed on the Gmail web interface. The email HTML contains the proper <img /> tag with the proper file address (see below). I tried to access the location and the file indeed is there, it’s just not showed. I quickly tested inline png images and those work properly. Any clues?

<img id="F87091C9-31F5-43C7-8972-0101521C8967" src="file:///home/gire/snap/mailspring/common/files/ru/ew/ruewre9uvxfwvsqmikxb7hmcceweazoucyhuhq82y/1 - Faktura-2.tiff" style="max-width: 100vw;">

(Originally posted by ggirelli on GitHub.)

Hey! Thanks for reporting this—I think there are a couple things going on here. Mailspring doesn’t preview TIFF images right now, and also doesn’t preview images that are larger than 5MB (because they can make the app use a lot of memory.)

I think it’d be fairly safe to allow <5MB tiff files to be previewed along with JPEG, GIF, etc. If anyone wants to take a look, I think this might be a good starter issue! There’s a utility function called shouldDisplayAsImage that determines whether Mailspring treats an attachment as an image or a file, I think the change could go in there.

(Originally posted by bengotow on GitHub.)

I know this is quite old but browser natively do not support TIFF files - we’d have to convert it using some library to canvas and display it from there (either generate temp file with thumbnail which sounds like a major refactor to me or display the encoded imagedata in img tag).

Is it really worth it? Do you want to continue with this? If yes - in which way? @bengotow

(Originally posted by lashus on GitHub.)