Skip to content

fix(server): full-size images not migrated or deleted correctly #17308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 1, 2025

Conversation

mertalev
Copy link
Contributor

@mertalev mertalev commented Apr 1, 2025

Description

The migration code uses a ternary operator, assuming there are only two file types. This is no longer true, so it doesn't behave correctly. This PR fixes this and refactors usages of getAssetFiles that only care about one file to retrieve that file instead. Also fixes the full-size images not being deleted during asset deletion.

Fixes #17301

@mertalev mertalev requested a review from danieldietzler as a code owner April 1, 2025 19:54
@mertalev mertalev changed the title fix(server): full-size images not migrated correctly fix(server): full-size images not migrated or deleted correctly Apr 1, 2025
@mertalev mertalev merged commit 59e5c82 into main Apr 1, 2025
47 checks passed
@mertalev mertalev deleted the fix/server-fullsize-migration branch April 1, 2025 22:11
@TheXRMonk
Copy link

I just ran migration on a fresh server before this fix - is it better to just re-backup my ~2k assets?

@alextran1502
Copy link
Contributor

@TheXRMonk Can you access your instance in incognito mode? scroll through the timeline and see if the thumbnails loaded? If not, you can run the Thumbnail Generation job for all and it should fixes the issue

kirill-dev-pro pushed a commit to kirill-dev-pro/immich-but-with-public-albums-within-instance that referenced this pull request Apr 6, 2025
…ch-app#17308)

* fix file path logic

* update tests

* add empty array fallback just in case for now
savely-krasovsky pushed a commit to savely-krasovsky/immich that referenced this pull request Jun 8, 2025
…ch-app#17308)

* fix file path logic

* update tests

* add empty array fallback just in case for now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migration wrongly renames thumb to fullsize on 1.131.0 to 1.131.2
4 participants