diff --git a/src/servers/api/file-browser/thumbnails.ts b/src/servers/api/file-browser/thumbnails.ts index 82de48be..e4b8c75d 100644 --- a/src/servers/api/file-browser/thumbnails.ts +++ b/src/servers/api/file-browser/thumbnails.ts @@ -43,7 +43,18 @@ import sharp from 'sharp'; * two are not exotic — HEIC is what every recent iPhone writes, and a folder of them showing generic * file icons was the most visible gap this had. */ -const IMAGE_EXT = new Set(['jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp', 'avif', 'tif', 'tiff', 'svg', 'heic', 'heif']); +/* + No `heic` or `heif`, and that is not an oversight. + + sharp's bundled libheif is built without the HEVC decoder, so it parses a HEIC's header and then + fails on the pixels. Listing them here made `ls` promise a thumbnail core cannot produce: every HEIC + cost a request that 422'd before falling back to the icon, and the promise was the only reason the + request happened at all. + + Decoding them needs ImageMagick and `libheif-plugin-libde265` — a system dependency the core has no + business acquiring for one format. That belongs to a plugin, and av-club already does it. +*/ +const IMAGE_EXT = new Set(['jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp', 'avif', 'tif', 'tiff', 'svg']); /* `ts` is NOT here, and that is the one entry worth explaining.