[PR #25234] feat: rework photo-viewer/asset-viewer - introduce adaptive-image.svelte #18123

Open
opened 2026-02-05 16:33:04 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/25234
Author: @midzelis
Created: 1/13/2026
Status: 🔄 Open

Base: push-lmxsupnmxsplHead: refactor/adaptive_image


📝 Commits (2)

  • 5c046df feat: rework photo-viewer/asset-viewer - introduce adaptive-image.svelte
  • a705be8 bugfixes in thumbnail

📊 Changes

20 files changed (+1131 additions, -420 deletions)

View changed files

📝 e2e/src/web/specs/photo-viewer.e2e-spec.ts (+11 -13)
📝 e2e/src/web/specs/timeline/utils.ts (+2 -5)
📝 pnpm-lock.yaml (+5 -18)
📝 web/package.json (+1 -2)
web/src/lib/actions/image-loader.svelte.ts (+207 -0)
📝 web/src/lib/actions/zoom-image.ts (+8 -3)
📝 web/src/lib/components/asset-viewer/actions/action.ts (+1 -1)
web/src/lib/components/asset-viewer/adaptive-image.svelte (+229 -0)
📝 web/src/lib/components/asset-viewer/asset-viewer.svelte (+171 -108)
📝 web/src/lib/components/asset-viewer/detail-panel.svelte (+40 -6)
📝 web/src/lib/components/asset-viewer/photo-viewer.svelte (+38 -136)
📝 web/src/lib/components/assets/broken-asset.svelte (+14 -4)
📝 web/src/lib/components/assets/thumbnail/image-thumbnail.svelte (+21 -29)
📝 web/src/lib/components/assets/thumbnail/thumbnail.svelte (+85 -84)
📝 web/src/lib/components/assets/thumbnail/video-thumbnail.svelte (+4 -1)
📝 web/src/lib/managers/ImageManager.svelte.ts (+35 -6)
📝 web/src/lib/stores/assets-store.svelte.ts (+1 -0)
📝 web/src/lib/utils.ts (+1 -4)
web/src/lib/utils/adaptive-image-loader.svelte.ts (+241 -0)
📝 web/src/lib/utils/layout-utils.ts (+16 -0)

📄 Description

Large rework photo-viewer/asset-viewer

Instead of spinner, use a new adaptive-image component. This component will display the thumbhash as the base layer - quickly followed up by the (highly likely) pre-cached low-res thumbnail, and then kick off the preview-size thumbnail. Mouse-wheel zoom is supported using all formats: thumbhash, preview. Zoom will automatically 'upgrade' the preview thumbnail to be 'fullsize' (or original) on zoom, like before, but now there will be no flicker when the full quality one loads.

All next/previous thumbnails are eagerly pre-loaded, and all pending images are canceled if navigation occurs before they finish loading. Preloads are lower priority, and will back off if a main-image is being loaded.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/25234 **Author:** [@midzelis](https://github.com/midzelis) **Created:** 1/13/2026 **Status:** 🔄 Open **Base:** `push-lmxsupnmxspl` ← **Head:** `refactor/adaptive_image` --- ### 📝 Commits (2) - [`5c046df`](https://github.com/immich-app/immich/commit/5c046df37d8a5801d83dbc9af0d5214a35e8c875) feat: rework photo-viewer/asset-viewer - introduce adaptive-image.svelte - [`a705be8`](https://github.com/immich-app/immich/commit/a705be8be6d63341d2564208743bcc6baa92ad71) bugfixes in thumbnail ### 📊 Changes **20 files changed** (+1131 additions, -420 deletions) <details> <summary>View changed files</summary> 📝 `e2e/src/web/specs/photo-viewer.e2e-spec.ts` (+11 -13) 📝 `e2e/src/web/specs/timeline/utils.ts` (+2 -5) 📝 `pnpm-lock.yaml` (+5 -18) 📝 `web/package.json` (+1 -2) ➕ `web/src/lib/actions/image-loader.svelte.ts` (+207 -0) 📝 `web/src/lib/actions/zoom-image.ts` (+8 -3) 📝 `web/src/lib/components/asset-viewer/actions/action.ts` (+1 -1) ➕ `web/src/lib/components/asset-viewer/adaptive-image.svelte` (+229 -0) 📝 `web/src/lib/components/asset-viewer/asset-viewer.svelte` (+171 -108) 📝 `web/src/lib/components/asset-viewer/detail-panel.svelte` (+40 -6) 📝 `web/src/lib/components/asset-viewer/photo-viewer.svelte` (+38 -136) 📝 `web/src/lib/components/assets/broken-asset.svelte` (+14 -4) 📝 `web/src/lib/components/assets/thumbnail/image-thumbnail.svelte` (+21 -29) 📝 `web/src/lib/components/assets/thumbnail/thumbnail.svelte` (+85 -84) 📝 `web/src/lib/components/assets/thumbnail/video-thumbnail.svelte` (+4 -1) 📝 `web/src/lib/managers/ImageManager.svelte.ts` (+35 -6) 📝 `web/src/lib/stores/assets-store.svelte.ts` (+1 -0) 📝 `web/src/lib/utils.ts` (+1 -4) ➕ `web/src/lib/utils/adaptive-image-loader.svelte.ts` (+241 -0) 📝 `web/src/lib/utils/layout-utils.ts` (+16 -0) </details> ### 📄 Description Large rework photo-viewer/asset-viewer Instead of spinner, use a new adaptive-image component. This component will display the thumbhash as the base layer - quickly followed up by the (highly likely) pre-cached low-res thumbnail, and then kick off the preview-size thumbnail. Mouse-wheel zoom is supported using all formats: thumbhash, preview. Zoom will automatically 'upgrade' the preview thumbnail to be 'fullsize' (or original) on zoom, like before, but now there will be no flicker when the full quality one loads. All next/previous thumbnails are eagerly pre-loaded, and all pending images are canceled if navigation occurs before they finish loading. Preloads are lower priority, and will back off if a main-image is being loaded. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 16:33:04 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#18123