core stops claiming HEIC it cannot decode
the revert above took the ImageMagick path back out of core, where it should never have gone: decoding HEIC needs ImageMagick and libheif-plugin-libde265, and the core has no business acquiring a system dependency for one format. that is a plugin's job. this removes the other half of the same mistake. `heic` and `heif` were in core's extension list from the day the thumbnailer was written, which made `ls` promise a thumbnail sharp cannot produce — so every HEIC in a folder cost a request that 422'd before falling back to the icon, and the promise was the only reason the request happened. so without a plugin the file browser is now what it was: a file icon for a HEIC, and no wasted round trip earning it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Officer-Session: 656f5c85-e49a-4f1f-b9f3-042a04b4d043
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user