Skip to content

feat: add full-resolution image option for asset loading#652

Open
hacuka325 wants to merge 1 commit into
immichFrame:mainfrom
hacuka325:fullres
Open

feat: add full-resolution image option for asset loading#652
hacuka325 wants to merge 1 commit into
immichFrame:mainfrom
hacuka325:fullres

Conversation

@hacuka325
Copy link
Copy Markdown

@hacuka325 hacuka325 commented Jun 2, 2026

Added new global setting UseFullResolutionImages with default false to preserve current behavior.
Updated image loading logic to request fullsize assets when the flag is enabled, otherwise keep using preview.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added a configurable option to load full-resolution images instead of preview-sized images. The setting defaults to disabled and can be enabled through environment variables, JSON, or YAML configuration files.
  • Documentation

    • Updated configuration documentation, Docker examples, and installation guides to include the new full-resolution images setting with default values and descriptions.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR introduces a new UseFullResolutionImages configuration setting that controls whether ImmichFrame loads full-resolution or preview-size image assets from the Immich server. The setting is defined in the configuration contract, implemented across the settings models, applied in the image retrieval logic, updated in test resources, and documented in examples and guides.

Changes

Full-Resolution Image Configuration

Layer / File(s) Summary
Contract and configuration models
ImmichFrame.Core/Interfaces/IServerSettings.cs, ImmichFrame.WebApi/Helpers/Config/ServerSettingsV1.cs, ImmichFrame.WebApi/Models/ServerSettings.cs
IGeneralSettings interface now declares UseFullResolutionImages boolean property. GeneralSettings, ServerSettingsV1, and ServerSettingsV1Adapter implement and expose the property with default value false.
Image retrieval logic
ImmichFrame.Core/Logic/PooledImmichFrameLogic.cs
Image fetch now conditionally selects AssetMediaSize.Fullsize or AssetMediaSize.Preview based on _generalSettings.UseFullResolutionImages when calling ViewAssetAsync for image assets.
Test configuration resources
ImmichFrame.WebApi.Tests/Resources/TestV1.json, ImmichFrame.WebApi.Tests/Resources/TestV2.json, ImmichFrame.WebApi.Tests/Resources/TestV2.yml
Test configuration files updated to include UseFullResolutionImages: true setting for test execution.
Example configs and documentation
docker/Settings.example.json, docker/Settings.example.yml, docker/example.env, Install_Web.md, docs/docs/getting-started/configuration.md, docs/docs/getting-started/configurationV1.md
Docker Compose environment examples, Docker settings templates, and configuration guides now document and include the UseFullResolutionImages setting with default false, describing that it switches between full-resolution and preview-size image loading.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A frame-full of images, full and clear,
No more previews, the details appear!
Config flags guide which size to show,
Full resolution steals the show!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the primary change: adding a full-resolution image option for asset loading.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
ImmichFrame.Core/Logic/PooledImmichFrameLogic.cs (1)

125-147: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Download cache is not invalidated when the resolution setting changes.

The on-disk cache lookup (Lines 125-140) and the saved filename ({id}.{ext}, Line 159) are keyed only on the asset id, not on the requested media size. When DownloadImages is enabled and a user later toggles UseFullResolutionImages, previously cached preview images (or vice-versa) will continue to be served from disk until RenewImagesDuration elapses, so the setting won't take effect for already-cached assets. Consider encoding the resolution into the cache key/filename so the two variants are stored separately.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ImmichFrame.Core/Logic/PooledImmichFrameLogic.cs` around lines 125 - 147, The
cache key currently uses only the asset id, so cached images don't vary by
resolution; update the lookup and save logic in PooledImmichFrameLogic to
include the requested media size (mediaSize /
_generalSettings.UseFullResolutionImages or AssetMediaSize) in the filename/key
(e.g., incorporate mediaSize name or flag alongside id), so
Directory.GetFiles(...) and Path.GetFileNameWithoutExtension(...) match the same
"{id}-{mediaSize}.{ext}" pattern and cache invalidation (RenewImagesDuration,
File.Delete) operates on the resolution-specific file; ensure the code paths
around mediaSize, ViewAssetAsync, and where the file is written use the same
naming convention.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@ImmichFrame.Core/Logic/PooledImmichFrameLogic.cs`:
- Around line 125-147: The cache key currently uses only the asset id, so cached
images don't vary by resolution; update the lookup and save logic in
PooledImmichFrameLogic to include the requested media size (mediaSize /
_generalSettings.UseFullResolutionImages or AssetMediaSize) in the filename/key
(e.g., incorporate mediaSize name or flag alongside id), so
Directory.GetFiles(...) and Path.GetFileNameWithoutExtension(...) match the same
"{id}-{mediaSize}.{ext}" pattern and cache invalidation (RenewImagesDuration,
File.Delete) operates on the resolution-specific file; ensure the code paths
around mediaSize, ViewAssetAsync, and where the file is written use the same
naming convention.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 99cb6eb1-0489-4e72-9d46-2fd8a8705f7a

📥 Commits

Reviewing files that changed from the base of the PR and between 8e94c69 and ff2f984.

📒 Files selected for processing (13)
  • ImmichFrame.Core/Interfaces/IServerSettings.cs
  • ImmichFrame.Core/Logic/PooledImmichFrameLogic.cs
  • ImmichFrame.WebApi.Tests/Resources/TestV1.json
  • ImmichFrame.WebApi.Tests/Resources/TestV2.json
  • ImmichFrame.WebApi.Tests/Resources/TestV2.yml
  • ImmichFrame.WebApi/Helpers/Config/ServerSettingsV1.cs
  • ImmichFrame.WebApi/Models/ServerSettings.cs
  • Install_Web.md
  • docker/Settings.example.json
  • docker/Settings.example.yml
  • docker/example.env
  • docs/docs/getting-started/configuration.md
  • docs/docs/getting-started/configurationV1.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant