Skip to content

Change .heic extension to .jpg if the file content is jpg - #1436

Open
jia-kai wants to merge 1 commit into
simulot:mainfrom
jia-kai:main
Open

jia-kai wants to merge 1 commit into
simulot:mainfrom
jia-kai:main

Conversation

@jia-kai

@jia-kai jia-kai commented Sep 3, 2026

Copy link
Copy Markdown

Immich has an issue handling files whose extension is .heic with actually JPEG content.

In this PR, I added a new function fixExtension, which renames the file based on the actual content. It currently only handles the heic vs jpeg case, but can be easily extended to handle other cases in the future.

@jia-kai
jia-kai requested a review from simulot as a code owner September 3, 2026 01:47

This branch has not been deployed

No deployments
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