Fix download file extensions when Immich serves WebP previews

With maxDownloadQuality=preview and Immich generating WebP previews, the
zip entries and per-asset downloads were named .jpg while carrying WebP
bytes. Previews, converted fullsize images and transcodes follow the
server's image settings, so derive the extension from the upstream
content-type for every non-/original endpoint, via a shared
servedMimeFrom() in gallery/sizing.ts.
This commit is contained in:
opencode
2026-10-04 11:05:07 +02:00
committed by Alan Grainger
parent 6a5ff3cd13
commit 2a99258278
8 changed files with 91 additions and 20 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ Highest quality served for a download (the download button and "download all" zi
- `"original"` - the full-resolution original file (default).
- `"fullsize"` - full resolution but always browser-displayable: the original for JPEG/PNG/WebP, Immich's converted JPEG for RAW/HEIF.
- `"preview"` - only the ~1440px preview JPEG.
- `"preview"` - only the ~1440px preview. The format is whatever Immich generates for its preview (JPEG or WebP, per the server's image settings), and downloaded filenames follow it.
## `maxZoomQuality`