HomePhabricator

Support non-JPG/PNG/GIF images

Description

Support non-JPG/PNG/GIF images

It looks like cropper.js can’t handle at least TIFF images (there’s no
error in the console, but it never fires the “ready” event), and the
same may be true for other formats like DjVu. Deal with this by
temporarily changing the <img src> to a thumbnail URL, because thumbs
are always PNGs or JPGs as far as I’m aware; since there’s no URL for
the thumbnail in the original size, just use the largest URL of the
srcset and accept, at least for now, that for extremely large images,
the resolution will be reduced during cropping.

Details

Provenance
LucasWerkmeisterAuthored on Aug 7 2020, 8:18 PM
Parents
R2422:0dea27dbbd72: Add Makefile and Travis CI
Branches
Unknown
Tags
Unknown
ChangeId
None