Chatterino / api

API powering some Chatterino2 features
MIT License
38 stars 19 forks source link

No previews for images uploaded from certain Samsung phones #555

Open M4tthewDE opened 10 months ago

M4tthewDE commented 10 months ago

Certain Samsung phones produce invalid JPEG files, which causes libvips to throw an error. Example image: https://kappa.lol/ZEhuj

Newer versions of libvips seem to work around this issue, see https://github.com/lovell/sharp/issues/1578 for more information. Govips does not support this workaround as of yet, and returns an error as can be seen in https://github.com/davidbyttow/govips/issues/348.

We should update govips as soon as there is a fix available to support these images.

n0vad3v commented 6 months ago

govips can use FailOnError to work around this, I've added a PoC here: https://github.com/davidbyttow/govips/issues/348#issuecomment-2002773634 here.