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.
encodeURI leaves , ; and other reserved characters raw in the RFC 5987
filename* value. A comma in an album title ("Yellow Aster Butte, WA")
makes Chrome see two Content-Disposition headers and fail the download
with ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION. Single-asset
downloads had the same bug for original filenames with a comma.
Both call sites now share attachmentDisposition(), which uses
encodeURIComponent plus the attr-char exclusions ' ( ) *.
If a tile is virtualised out before its in-flight thumbnail finishes, the
load event still fires on the detached <img>. Without a guard that callback
would add the index to state.stickyTiles, potentially pinning a later
replacement tile whose own <img> has not painted yet.
Only register the index while this <a> is still the live tile for it
(state.renderedTiles.get(index) === a).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Bumps the release version so the cache-busted static asset path
(/share/static/<version>/js/client/init.js) changes and clients pick up the
rebuilt gallery bundle with the sticky-thumbnail fix instead of an
immutably-cached old one.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The gallery virtualiser removed a tile's <a>/<img> from the DOM whenever it
left the viewport ± 1 buffer and rebuilt it from scratch on re-entry, so
scrolling back up replayed the thumbhash placeholder and opacity fade on
thumbnails that were already loaded - even for small albums where no network
fetch happens.
Track tile indices whose <img> has fired `load` in a bounded, LRU-ordered
`stickyTiles` set. virtualize() keeps those tiles in the "needed" set so
syncRendered never unmounts them; not-yet-loaded tiles still get the normal
lazy create/remove + data-src treatment, so large albums keep lazy-loading
on first scroll-into-view.
The set is trimmed to STICKY_TILE_LIMIT (1500) each pass - currently visible
tiles are bumped to most-recently-used and the oldest off-screen overflow is
released back to normal virtualisation - so a very large album (100k+ photos)
cannot accumulate unbounded mounted DOM or retained image memory as the user
scrolls. Cleared on a layout recompute since tile geometry changes there.
Also adds a fast-path skip in loadVisibleTiles() for finished loads now that
the rendered-tile map can be larger.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Show a badge on the gallery thumbnail and a lightbox toggle that plays the
photo's clip over the still, matching Immich's own viewer.
The clip is a hidden Immich asset, but the existing share key already
authorises it - checkSharedLinkAccess whitelists each shared asset's
livePhotoVideoId - so no new upstream access is involved. The video route
accepts a clip id only when a shared still points at it.
Both enumeration paths already carry the field (AssetResponseDto for
individual shares, TimeBucketAssetResponseDto for album buckets), so album
shares cost no extra upstream requests.
Gated by ipp.motionPhotos (default true). The clip is preload="none" and is
only fetched when a visitor presses the toggle.
When groupByDate was enabled the gallery re-sorted unconditionally
newest-first, discarding the album.order that immich.ts had already
applied. Branch the grouping sort on share.album.order so 'asc' sorts
ascending, keeping the descending default for individual shares and
albums with no order set.
Fixes#271