[PR #12765] [CLOSED] fix(web): image preload and cancelation #13704

Closed
opened 2026-02-05 15:19:22 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/12765
Author: @midzelis
Created: 9/18/2024
Status: Closed

Base: mainHead: img_preload_n_cancel


📝 Commits (5)

  • b080a92 fix(web): image preload and cancelation
  • 4318dc5 lint
  • ab24f4f Merge remote-tracking branch 'origin/main' into img_preload_n_cancel
  • 92fbef0 Merge branch 'main' into img_preload_n_cancel
  • fb19639 Merge branch 'main' into img_preload_n_cancel

📊 Changes

6 files changed (+193 additions, -54 deletions)

View changed files

📝 web/src/lib/components/asset-viewer/photo-viewer.svelte (+22 -43)
📝 web/src/lib/components/asset-viewer/video-native-viewer.svelte (+13 -2)
📝 web/src/lib/components/photos-page/asset-grid.svelte (+8 -2)
📝 web/src/lib/components/photos-page/memory-lane.svelte (+8 -5)
📝 web/src/lib/stores/asset-viewing.store.ts (+7 -2)
web/src/lib/utils/image-manager.ts (+135 -0)

📄 Description

This is the beginning of a multi-part set of PRs, each of which will stand on its own, mostly because it will be easier to review, and understand smaller changes, and its generally a best practice.

In this PR, the base functionality for image preload and cancelation is fixed, previously broken in #9684.

Additionally, video loads can also be canceled while they are still being buffered by pausing the video, and clearing the src attribute.

Also, the memory-lane component has been retrofitted to use image-thumbnail instead of bare images. In general, all thumbnails should be loaded via the image-thumbnail (or thumbnail) components.

The main part of this PR is the introduction of an image-manager component - it orchestrates the loading/cancelation of images.

A future PR will ensure that all images are loaded via the image-manager component.


🔄 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/12765 **Author:** [@midzelis](https://github.com/midzelis) **Created:** 9/18/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `img_preload_n_cancel` --- ### 📝 Commits (5) - [`b080a92`](https://github.com/immich-app/immich/commit/b080a9256d72e1a4f0f17d340aff8b2754a6ce23) fix(web): image preload and cancelation - [`4318dc5`](https://github.com/immich-app/immich/commit/4318dc530c64d5753089445d40263360a1ef0b3b) lint - [`ab24f4f`](https://github.com/immich-app/immich/commit/ab24f4fe0328e4b963c281e0c19f004cf970e1d9) Merge remote-tracking branch 'origin/main' into img_preload_n_cancel - [`92fbef0`](https://github.com/immich-app/immich/commit/92fbef062a74b35ee644025052e07857cb61906a) Merge branch 'main' into img_preload_n_cancel - [`fb19639`](https://github.com/immich-app/immich/commit/fb196397dc78299e0e6f082922e8aab0d310b761) Merge branch 'main' into img_preload_n_cancel ### 📊 Changes **6 files changed** (+193 additions, -54 deletions) <details> <summary>View changed files</summary> 📝 `web/src/lib/components/asset-viewer/photo-viewer.svelte` (+22 -43) 📝 `web/src/lib/components/asset-viewer/video-native-viewer.svelte` (+13 -2) 📝 `web/src/lib/components/photos-page/asset-grid.svelte` (+8 -2) 📝 `web/src/lib/components/photos-page/memory-lane.svelte` (+8 -5) 📝 `web/src/lib/stores/asset-viewing.store.ts` (+7 -2) ➕ `web/src/lib/utils/image-manager.ts` (+135 -0) </details> ### 📄 Description This is the beginning of a multi-part set of PRs, each of which will stand on its own, mostly because it will be easier to review, and understand smaller changes, and its generally a best practice. In this PR, the base functionality for image preload and cancelation is fixed, previously broken in #9684. Additionally, video loads can also be canceled while they are still being buffered by pausing the video, and clearing the src attribute. Also, the memory-lane component has been retrofitted to use image-thumbnail instead of bare images. In general, all thumbnails should be loaded via the image-thumbnail (or thumbnail) components. The main part of this PR is the introduction of an image-manager component - it orchestrates the loading/cancelation of images. A future PR will ensure that all images are loaded via the image-manager component. --- <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 15:19:22 +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#13704