[PR #7279] [MERGED] refactor(mobile): Use ImmichThumbnail and local thumbnail image provider #11577

Closed
opened 2026-02-05 14:42:05 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/7279
Author: @martyfuhry
Created: 2/21/2024
Status: Merged
Merged: 2/27/2024
Merged by: @alextran1502

Base: mainHead: refactor/immich-thumbnail


📝 Commits (10+)

  • 718c258 Refactor to use ImmichThumbnail and local thumbnail image provider
  • 84cd91b dart format
  • b05d4fa Adds blurhash
  • c0ef300 Fixes image blur
  • 4d60133 uses hook instead of stateful widget to be more consistent
  • c269499 Uses blurhash hook state
  • 1eb96fa Uses blurhash ref instead of state
  • b9d4380 Fixes fade in duration for fade in placeholder
  • 4532db5 Merge branch 'main' of github.com:immich-app/immich into refactor/immich-thumbnail
  • ef2f605 Fixes an issue where thumbnails fail to load if too many thumbnail requests are made simultaenously

📊 Changes

20 files changed (+588 additions, -129 deletions)

View changed files

📝 mobile/lib/modules/album/ui/album_thumbnail_card.dart (+3 -3)
📝 mobile/lib/modules/album/ui/shared_album_thumbnail_image.dart (+3 -3)
📝 mobile/lib/modules/album/views/sharing_page.dart (+3 -3)
📝 mobile/lib/modules/asset_viewer/image_providers/immich_local_image_provider.dart (+8 -10)
mobile/lib/modules/asset_viewer/image_providers/immich_local_thumbnail_provider.dart (+86 -0)
📝 mobile/lib/modules/asset_viewer/image_providers/immich_remote_image_provider.dart (+21 -14)
📝 mobile/lib/modules/asset_viewer/image_providers/immich_remote_thumbnail_provider.dart (+17 -9)
📝 mobile/lib/modules/asset_viewer/views/gallery_viewer.dart (+14 -13)
📝 mobile/lib/modules/home/ui/asset_grid/thumbnail_image.dart (+5 -5)
📝 mobile/lib/modules/memories/ui/memory_card.dart (+2 -2)
📝 mobile/lib/modules/memories/views/memory_page.dart (+2 -2)
📝 mobile/lib/shared/models/asset.dart (+9 -1)
📝 mobile/lib/shared/models/asset.g.dart (+209 -11)
mobile/lib/shared/ui/fade_in_placeholder_image.dart (+35 -0)
mobile/lib/shared/ui/hooks/blurhash_hook.dart (+17 -0)
📝 mobile/lib/shared/ui/immich_image.dart (+8 -53)
mobile/lib/shared/ui/immich_thumbnail.dart (+89 -0)
mobile/lib/shared/ui/thumbhash_placeholder.dart (+48 -0)
📝 mobile/pubspec.lock (+8 -0)
📝 mobile/pubspec.yaml (+1 -0)

📄 Description

  • Makes a new ImmichThumbnail with image providers
  • New ImmichLocalThumbnailProvider for showing local thumbnails
  • Loads low resolution thumbnail in multipart loading (need to test the usefulness of this)
  • Adds blur effect to thumbnail previews in gallery mode
  • Changes custom image provider type to be their own class
  • Adds blurhash (Closes #7055 )

Blurhash

Thumbnail preview

Without blur / With blur

Also might add in cache for remote images in this one.


🔄 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/7279 **Author:** [@martyfuhry](https://github.com/martyfuhry) **Created:** 2/21/2024 **Status:** ✅ Merged **Merged:** 2/27/2024 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `refactor/immich-thumbnail` --- ### 📝 Commits (10+) - [`718c258`](https://github.com/immich-app/immich/commit/718c258a07ed33bb7344e866d34a43bb04512ad1) Refactor to use ImmichThumbnail and local thumbnail image provider - [`84cd91b`](https://github.com/immich-app/immich/commit/84cd91bbbe5610bdfdc536b484df180fcdcf8f03) dart format - [`b05d4fa`](https://github.com/immich-app/immich/commit/b05d4fa7d3a934564f8198ecf783661631aecb82) Adds blurhash - [`c0ef300`](https://github.com/immich-app/immich/commit/c0ef300040dd0911f1e0362efc5d83ce8ddbe6cc) Fixes image blur - [`4d60133`](https://github.com/immich-app/immich/commit/4d60133504541b5d0f5581682e54950bf0ecae09) uses hook instead of stateful widget to be more consistent - [`c269499`](https://github.com/immich-app/immich/commit/c2694996e55e9bdaeaad6402b73b94ba582a2169) Uses blurhash hook state - [`1eb96fa`](https://github.com/immich-app/immich/commit/1eb96fa9e9b367d4552437ab196e0a3a89b61162) Uses blurhash ref instead of state - [`b9d4380`](https://github.com/immich-app/immich/commit/b9d438006c0abf6acc694bdfccef29bbeb240607) Fixes fade in duration for fade in placeholder - [`4532db5`](https://github.com/immich-app/immich/commit/4532db552e2ce735f134eed960dfc2b378aea07a) Merge branch 'main' of github.com:immich-app/immich into refactor/immich-thumbnail - [`ef2f605`](https://github.com/immich-app/immich/commit/ef2f605635633f2752b41bba2274bf2638b8f143) Fixes an issue where thumbnails fail to load if too many thumbnail requests are made simultaenously ### 📊 Changes **20 files changed** (+588 additions, -129 deletions) <details> <summary>View changed files</summary> 📝 `mobile/lib/modules/album/ui/album_thumbnail_card.dart` (+3 -3) 📝 `mobile/lib/modules/album/ui/shared_album_thumbnail_image.dart` (+3 -3) 📝 `mobile/lib/modules/album/views/sharing_page.dart` (+3 -3) 📝 `mobile/lib/modules/asset_viewer/image_providers/immich_local_image_provider.dart` (+8 -10) ➕ `mobile/lib/modules/asset_viewer/image_providers/immich_local_thumbnail_provider.dart` (+86 -0) 📝 `mobile/lib/modules/asset_viewer/image_providers/immich_remote_image_provider.dart` (+21 -14) 📝 `mobile/lib/modules/asset_viewer/image_providers/immich_remote_thumbnail_provider.dart` (+17 -9) 📝 `mobile/lib/modules/asset_viewer/views/gallery_viewer.dart` (+14 -13) 📝 `mobile/lib/modules/home/ui/asset_grid/thumbnail_image.dart` (+5 -5) 📝 `mobile/lib/modules/memories/ui/memory_card.dart` (+2 -2) 📝 `mobile/lib/modules/memories/views/memory_page.dart` (+2 -2) 📝 `mobile/lib/shared/models/asset.dart` (+9 -1) 📝 `mobile/lib/shared/models/asset.g.dart` (+209 -11) ➕ `mobile/lib/shared/ui/fade_in_placeholder_image.dart` (+35 -0) ➕ `mobile/lib/shared/ui/hooks/blurhash_hook.dart` (+17 -0) 📝 `mobile/lib/shared/ui/immich_image.dart` (+8 -53) ➕ `mobile/lib/shared/ui/immich_thumbnail.dart` (+89 -0) ➕ `mobile/lib/shared/ui/thumbhash_placeholder.dart` (+48 -0) 📝 `mobile/pubspec.lock` (+8 -0) 📝 `mobile/pubspec.yaml` (+1 -0) </details> ### 📄 Description - Makes a new `ImmichThumbnail` with image providers - New `ImmichLocalThumbnailProvider` for showing local thumbnails - Loads low resolution thumbnail in multipart loading (need to test the usefulness of this) - Adds blur effect to thumbnail previews in gallery mode - Changes custom image provider type to be their own class - Adds blurhash (Closes #7055 ) ### Blurhash <img src="https://github.com/immich-app/immich/assets/100457/c3f885ed-5472-41f6-909f-ffe96327fb3d" width=200 /> ### Thumbnail preview Without blur / With blur <img src="https://github.com/immich-app/immich/assets/100457/3999ea0a-2e54-4f51-bc24-cb8e0437a496" width=300 /> <img src="https://github.com/immich-app/immich/assets/100457/a95817f2-5139-4678-b7a4-30bb5e3f077e" width=300 /> Also might add in cache for remote images in this one. --- <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 14:42:05 +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#11577