fix: ICO needs CLI decode, AVIF compress missing options, remove JXL output

- ICO: Sharp cannot decode ICO files. Added ImageMagick-based ICO decoder
  that extracts the largest embedded image. Added ICO to CLI_DECODED_FORMATS
  and SERVER_PREVIEW_EXTENSIONS. Removed from BROWSER_PREVIEWABLE sets.
- AVIF compress: Sharp's AVIF encoder requires effort option. Added
  formatOpts() helper that supplies effort:4 for AVIF format.
- JXL output: Docker's bundled libvips lacks the JXL encoder plugin.
  Removed JXL as a convert output target to avoid guaranteed failures.
  JXL remains fully supported as an input format.
This commit is contained in:
ashim-hq
2026-04-21 10:20:08 +08:00
parent 2df0fe026e
commit dc9160746e
9 changed files with 84 additions and 14 deletions
+1
View File
@@ -3,6 +3,7 @@ import { formatHeaders } from "@/lib/api";
const SERVER_PREVIEW_EXTENSIONS = new Set([
"heic", "heif", "hif", // HEIF
"jxl", // JPEG XL (Chrome dropped support)
"ico", // ICO (Sharp can't decode)
"dng", "cr2", "nef", "arw", "orf", "rw2", // Camera RAW
"tga", // Targa
"psd", // Photoshop