Skip to content

Reintroduce immich permissions fix for shared albums#614

Open
dimiandre wants to merge 1 commit intofatihak:mainfrom
dimiandre:fix/immich-shared-album-assets
Open

Reintroduce immich permissions fix for shared albums#614
dimiandre wants to merge 1 commit intofatihak:mainfrom
dimiandre:fix/immich-shared-album-assets

Conversation

@dimiandre
Copy link
Copy Markdown

What happened

#469 (Fix Immich permissions issue for shared albums) correctly fixed shared albums by fetching assets via GET /api/albums/{id} and using the response assets array, so all album members’ photos were included.

In #427 (Image memory optimization), the plugin was refactored (new image loader, get_album_id + get_assets, etc.). During that refactor, asset listing was switched back to POST /api/search/metadata with albumIds, and the #469 behavior was effectively reverted. So the fix was already there; it was removed by mistake.

Resulting bug

For shared albums, the plugin once again only sees assets owned by the API key user. The UI shows the full album (e.g. 33 photos), but the plugin only receives a subset (e.g. 5). As a result, “random” selection is limited and the same photos repeat.

I believe this is a very common scenario. For example, I created the album using my account and uploaded some photos, but the majority were uploaded by my girlfriend with a different account.

This PR

Restores the #469 approach for listing assets: use GET /api/albums/{albumId} and album.get("assets", []) again. All of #427’s improvements are kept (streaming, resize, image loader) only the source of the asset list is reverted to the endpoint that returns the full album, including shared contributors. No change to how images are loaded, so the OOM fix from #427 should remain in place.

@iAndrea
Copy link
Copy Markdown
Contributor

iAndrea commented Mar 16, 2026

@dimiandre I was having OOM issues with full size immich images, I took the opportunity to include your code if it is fine to you :)
Just to have a single PR and reduce other possible conflict like the old image memory optimization of mine (sorry btw).

#625

I had to add the asset.view permission, for a good reason though.

@dimiandre
Copy link
Copy Markdown
Author

@dimiandre I was having OOM issues with full size immich images, I took the opportunity to include your code if it is fine to you :) Just to have a single PR and reduce other possible conflict like the old image memory optimization of mine (sorry btw).

#625

I had to add the asset.view permission, for a good reason though.

thanks! i'll try your implementation too. I'm having your same problem, usually goes oom after 5-6 days of running

@iAndrea
Copy link
Copy Markdown
Contributor

iAndrea commented Mar 26, 2026

@dimiandre exactly, after a few days too!
Since this fix I've never had to restart the service again 🤞

@bphenriques
Copy link
Copy Markdown

Interested in this as I am facing similar issues :)

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.

3 participants