Skip to content

fix(web): prevent Safari from overwriting live photo image with video#26898

Merged
jrasm91 merged 1 commit intoimmich-app:mainfrom
saurav61091:fix/safari-live-photo-download
Mar 26, 2026
Merged

fix(web): prevent Safari from overwriting live photo image with video#26898
jrasm91 merged 1 commit intoimmich-app:mainfrom
saurav61091:fix/safari-live-photo-download

Conversation

@saurav61091
Copy link
Copy Markdown
Contributor

@saurav61091 saurav61091 commented Mar 13, 2026

Description

When downloading a live photo from a shared album link in Safari, both the image and motion video share the same base filename. Safari overwrites the first download with the second, leaving only the .mov file.

Fix: append -motion suffix to the video filename (e.g., IMG_1234.heic stays as-is, IMG_1234.mov becomes IMG_1234-motion.mov).

Fixes #23055

How Has This Been Tested?

  • Updated existing unit test (asset.service.spec.ts) to match new motion filename format
  • Manual test: download live photo from shared link in Safari — verify both files saved
  • Manual test: verify download still works in Chrome/Firefox

Screenshots (if appropriate)

N/A — no visual changes, this is a download filename fix.

Checklist:

  • I have carefully read CONTRIBUTING.md
  • I have performed a self-review of my own code
  • I have no unrelated changes in the PR
  • I have confirmed that any new dependencies are strictly necessary
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code

Please describe to which degree, if any, an LLM was used in creating this pull request.

An LLM (Claude) was used to assist with identifying the relevant code and drafting the fix. I reviewed and verified the changes, confirmed the approach matches the maintainer's suggestion in #23055, and validated the test update.

@bo0tzz
Copy link
Copy Markdown
Member

bo0tzz commented Mar 13, 2026

Please fill out the complete PR template

@saurav61091
Copy link
Copy Markdown
Contributor Author

Hi @bo0tzz, I've updated the PR description with the complete template. Could you take another look? The changelog label will need to be added by a maintainer. Thanks!

When downloading a live photo, Safari overwrites the image file with
the motion video because both share the same base filename. Append
'-motion' suffix to the video filename to prevent collision.

For example, IMG_1234.heic and IMG_1234.mov become IMG_1234.heic
and IMG_1234-motion.mov.

Fixes immich-app#23055
@jrasm91 jrasm91 force-pushed the fix/safari-live-photo-download branch from 45ea920 to d247bdb Compare March 26, 2026 18:24
@jrasm91 jrasm91 merged commit e2d26eb into immich-app:main Mar 26, 2026
48 checks passed
oPeras1 pushed a commit to oPeras1/immich that referenced this pull request Mar 27, 2026
…immich-app#26898)

When downloading a live photo, Safari overwrites the image file with
the motion video because both share the same base filename. Append
'-motion' suffix to the video filename to prevent collision.

For example, IMG_1234.heic and IMG_1234.mov become IMG_1234.heic
and IMG_1234-motion.mov.

Fixes immich-app#23055
eleboucher pushed a commit to eleboucher/homelab that referenced this pull request Apr 7, 2026
….0) (#101)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [immich-app/immich](https://github.com/immich-app/immich) | minor | `v2.6.3` → `v2.7.0` |

---

### Release Notes

<details>
<summary>immich-app/immich (immich-app/immich)</summary>

### [`v2.7.0`](https://github.com/immich-app/immich/releases/tag/v2.7.0)

[Compare Source](immich-app/immich@v2.6.3...v2.7.0)

### v2.7.0

Welcome to Immich `v2.7.0`!

This release includes enhancements to the asset viewer, security improvements, changes to the duplicate APIs and viewer, and a bunch of bug fixes. Keep reading below for the complete highlights and a note on the upcoming `v3.0.0` release.

> \[!NOTE]\
> We're working on a managed backup service for Immich with end-to-end encrypted backups of your library to a remote datacentre where only you hold the keys.
>
> We've put together a quick survey (\~5 mins) to get a better idea of how you're backing things up today and what you'd actually want from something like this. Your answers help us figure out what to prioritise, so we'd really appreciate it if you took a few minutes to fill it out.
>
> Leave your email at the end if you're interested in joining our free closed beta when it's ready.
>
> <https://futo-backups-survey.immich.app/>

#### Known limitations

- The machine learning service on `amd64` currently requires the `>= x86-64-v2` microarchitecture. This will be patched in an upcoming patch release for backward compatibility with very old processors (before \~2010), but it will become a minimum requirement in 3.0. `arm64` is not affected by this change.

#### Highlights

- Remove from album (asset viewer)
- Move to locked folder (folder page)
- Editor shortcuts
- Create a new face on-the-fly in the face tag editor
- Resolve duplicates
- Helmet configuration
- Version check infrastructure
- Notable fix: live photo and video download in Safari
- Notable fix: escape HTML in the Panorama Photo Viewer

##### Remove from album

The web has a new action, "Remove from album," available in the asset viewer that makes it easier to remove an asset from an album. This action is available to both album and asset owners.

<img width="360" height="202" alt="image" src="https://github.com/user-attachments/assets/e5facb24-ed10-4adc-957a-37147cca5634" />

##### Move to locked folder in the Folder view

Similarly, the folder view now includes the "Move to locked folder" action.

<img width="1900" height="762" alt="image" src="https://github.com/user-attachments/assets/c39e792b-81da-4c31-a23f-03f96853fe8e" />

##### Editor shortcuts

Users on the web can now edit with keyboard shortcuts. Press `e` to open the editor. Once in the editor, press `[` or `]` to rotate the asset +/- 90 degrees. Finally, save any changes and close the editor with `ENTER`.

<https://github.com/user-attachments/assets/969de104-b02d-41a6-830b-3e1a49541d14>

##### Create a new face on-the-fly in the face tag editor

You can now create a new face/person on the fly from the face tagging editor interface

<img width="350" alt="image" src="https://github.com/user-attachments/assets/c39db0e3-da47-4421-9040-5f51650deee9" />

<img width="350" alt="image" src="https://github.com/user-attachments/assets/0c81a1ee-c54e-4167-9dff-95719fe44595" />

##### Deduplication improvements

The duplicate screen has gone through a bunch of iterations since it was first introduced all the way back in May, 2024. The latest release moves a bunch of logic from the client to the server, which now automatically suggests which asset to keep based on image size and EXIF data. Additionally, the new server implementation will automatically synchronize metadata, including albums, favorite status, rating, description, visibility, location, and tags. For more information about this process, see the new [documentation](https://docs.immich.app/features/duplicates-utility).

##### Helmet configuration

You can now opt in to using a [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) in Immich. The new environment variant `IMMICH_HELMET_FILE` accepts a boolean or a path to a [helmet](https://helmetjs.github.io/) configuration file.

**Recommend action:** The team recommends setting `IMMICH_HELMET_FILE=true` to enable the default policy. Then, please let us know if you run into any issues with it.

##### Background and details

Since Immich is deployed in so many different ways, it has been hard to figure out how to enable a CSP that would not conflict with or break existing installs that might use 3rd party map providers, custom CSS, embed Immich in an iframe, or other such features. In this release, we have added the ability to both opt in to a default policy and configure a custom one. To use the default policy, simply set the environment variable `IMMICH_HELMET_FILE=true`. To use a custom policy, set the environment variable to a path on disk (within the immich-server) that contains a valid helmet configuration (e.g. `IMMICH_HELMET_FILE=/opt/immich/helmet.json`). CSP can be used to control what scripts are allowed to run on the page, which domains to load images from, etc. Additionally, it can be used to configure headers for [Referrer-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referrer-Policy), [X-Powered-By](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Powered-By), [X-Frame-Options](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Frame-Options), and others.

##### New version check infrastructure

Prior to this release, instances that used the automatic version check feature would send HTTP requests to `github.com`. Now, we have set up a small service at `version.immich.cloud` to handle these types of requests. This avoids any privacy implications of connecting to `github.com` , as well as moves the request load to our own infrastructure.

##### Notable fix: live photo and video download in Safari

When downloading files in Safari with the same name, it will simply overwrite the file instead of automatically renaming it. In this release, the still and motion parts of a live photo are now named differently to prevent this from happening.

##### Notable fix: escape HTML in panorama photo viewer

In `v2.6.0`, we added the ability to show/view clip text in the panorama viewer, but introduced an XSS vulnerability, which has been fixed in this release. Interestingly, this was XSS using text in the image, which would then get read by OCR.

##### Notable fix: Immich User Agent for external requests

Similar to the mobile app, the server now sends a custom [User Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent) header. The format for the User Agent is `immich-server/{version}`. For example, `immich-server/2.7.0`.

#### `v3.0.0`

Just a heads up that this is the likely to be the last release before  `v3.0.0`. Being a major release there will be a handful of breaking changes, *although it's worth noting that nothing is currently planned that requires  user intervention*. It is mainly changes that impact 3rd party developers. More information and details should be available in the coming weeks.

#### Support Immich

<p align="center">

<img src="https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExbjY2eWc5Y2F0ZW56MmR4aWE0dDhzZXlidXRmYWZyajl1bWZidXZpcyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/87CKDqErVfMqY/giphy.gif" width="450" title="SUPPORT THE PROJECT!">

</p>

If you find the project helpful, you can support Immich by purchasing a product key at <https://buy.immich.app> or our merchandise at <https://immich.store>

***

<!-- Release notes generated using configuration in .github/release.yml at v2.7.0 -->

#### What's Changed

##### 🚀 Features

- feat: add support for helmet configuration by [@&#8203;jrasm91](https://github.com/jrasm91) in [#&#8203;27058](immich-app/immich#27058)
- feat: create new person in face editor by [@&#8203;alextran1502](https://github.com/alextran1502) in [#&#8203;27364](immich-app/immich#27364)

##### 🌟 Enhancements

- feat(web): add a seperate tooltip for switching from dark to light mode by [@&#8203;Vogeluff](https://github.com/Vogeluff) in [#&#8203;27297](immich-app/immich#27297)
- feat(web): focus on face-editor search input by [@&#8203;cratoo](https://github.com/cratoo) in [#&#8203;27136](immich-app/immich#27136)
- feat(web): add RemoveFromAlbumAction to asset viewer nav bar by [@&#8203;timonrieger](https://github.com/timonrieger) in [#&#8203;27000](immich-app/immich#27000)
- feat(web): add shortcuts to rotate images by [@&#8203;squishykid](https://github.com/squishykid) in [#&#8203;26927](immich-app/immich#26927)
- feat(server): add checksum algorithm field by [@&#8203;etnoy](https://github.com/etnoy) in [#&#8203;26573](immich-app/immich#26573)
- feat(server): resolve duplicates by [@&#8203;Phlogi](https://github.com/Phlogi) in [#&#8203;25316](immich-app/immich#25316)
- chore(mobile): reduce spacing on video controls by [@&#8203;uhthomas](https://github.com/uhthomas) in [#&#8203;27313](immich-app/immich#27313)
- perf(server): optimize people page query by [@&#8203;ffchung](https://github.com/ffchung) in [#&#8203;27346](immich-app/immich#27346)
- feat(web): dim photo outside hovered face bounding box by [@&#8203;midzelis](https://github.com/midzelis) in [#&#8203;27402](immich-app/immich#27402)
- feat(web): OCR overlay interactivity during zoom by [@&#8203;midzelis](https://github.com/midzelis) in [#&#8203;27039](immich-app/immich#27039)
- feat: add move to lock folder in folder view by [@&#8203;alextran1502](https://github.com/alextran1502) in [#&#8203;27384](immich-app/immich#27384)
- feat(web): highlight active person thumbnail in detail panel and edit faces panel by [@&#8203;midzelis](https://github.com/midzelis) in [#&#8203;27401](immich-app/immich#27401)
- feat: move version checks to our own infrastructure by [@&#8203;zackpollard](https://github.com/zackpollard) in [#&#8203;27450](immich-app/immich#27450)
- feat: add preview button when selecting images by [@&#8203;johnmaguire](https://github.com/johnmaguire) in [#&#8203;27305](immich-app/immich#27305)
- fix: user-agent format by [@&#8203;jrasm91](https://github.com/jrasm91) in [#&#8203;27488](immich-app/immich#27488)
- chore(mobile): reduce buffering timer duration by [@&#8203;uhthomas](https://github.com/uhthomas) in [#&#8203;27111](immich-app/immich#27111)
- fix(mobile): use key on video controls by [@&#8203;uhthomas](https://github.com/uhthomas) in [#&#8203;27512](immich-app/immich#27512)
- feat(server): Add support for .ts files by [@&#8203;ray](https://github.com/ray) in [#&#8203;27529](immich-app/immich#27529)

##### 🐛 Bug fixes

- fix(server): refresh unedited asset dimensions on metadata extraction by [@&#8203;michelheusschen](https://github.com/michelheusschen) in [#&#8203;27220](immich-app/immich#27220)
- fix(server): memory fragmentation by [@&#8203;mertalev](https://github.com/mertalev) in [#&#8203;27027](immich-app/immich#27027)
- fix(database restores): don't assume onboarding has completed by [@&#8203;insertish](https://github.com/insertish) in [#&#8203;27052](immich-app/immich#27052)
- fix(web): preserve timezone when changing timestamp (Closes [#&#8203;25354](immich-app/immich#25354)) by [@&#8203;updatemike](https://github.com/updatemike) in [#&#8203;27095](immich-app/immich#27095)
- fix: various command palette usages by [@&#8203;danieldietzler](https://github.com/danieldietzler) in [#&#8203;27304](immich-app/immich#27304)
- fix(web): keep map view open after closing asset viewer by [@&#8203;diiogofer](https://github.com/diiogofer) in [#&#8203;26980](immich-app/immich#26980)
- fix(web): prevent Safari from overwriting live photo image with video by [@&#8203;saurav61091](https://github.com/saurav61091) in [#&#8203;26898](immich-app/immich#26898)
- fix(mobile): video icon not showing on memories by [@&#8203;YarosMallorca](https://github.com/YarosMallorca) in [#&#8203;27311](immich-app/immich#27311)
- fix(mobile): mismatch between system and app color when using low-chroma system color scheme by [@&#8203;putuprema](https://github.com/putuprema) in [#&#8203;27282](immich-app/immich#27282)
- fix(mobile): images loads sometimes cancel too early by [@&#8203;LeLunZ](https://github.com/LeLunZ) in [#&#8203;27067](immich-app/immich#27067)
- fix(mobile): streamline error handling for live photo saving by [@&#8203;LeLunZ](https://github.com/LeLunZ) in [#&#8203;27337](immich-app/immich#27337)
- fix(web): keep upload totals stable when dismissing items ([#&#8203;27247](immich-app/immich#27247)) by [@&#8203;Nicolas-micuda-becker](https://github.com/Nicolas-micuda-becker) in [#&#8203;27354](immich-app/immich#27354)
- fix(mobile): low upload timeout on android by [@&#8203;mertalev](https://github.com/mertalev) in [#&#8203;27399](immich-app/immich#27399)
- fix(web): add drop shadow to asset viewer nav bar and prevent button shrinking by [@&#8203;midzelis](https://github.com/midzelis) in [#&#8203;27404](immich-app/immich#27404)
- fix(mobile): favorite button not updating state by [@&#8203;YarosMallorca](https://github.com/YarosMallorca) in [#&#8203;27271](immich-app/immich#27271)
- fix: detection of WebM container by [@&#8203;chanb22](https://github.com/chanb22) in [#&#8203;24182](immich-app/immich#24182)
- fix(web): prevent AssetUpdate from adding unrelated timeline assets by [@&#8203;michelheusschen](https://github.com/michelheusschen) in [#&#8203;27369](immich-app/immich#27369)
- fix: withFilePath select edited or unedited file by [@&#8203;bwees](https://github.com/bwees) in [#&#8203;27328](immich-app/immich#27328)
- fix(web): Enable stack selector in shared album view by [@&#8203;timonrieger](https://github.com/timonrieger) in [#&#8203;24641](immich-app/immich#24641)
- fix(server): use substring matching for person name search by [@&#8203;okxint](https://github.com/okxint) in [#&#8203;26903](immich-app/immich#26903)
- fix: escape html by [@&#8203;jrasm91](https://github.com/jrasm91) in [#&#8203;27469](immich-app/immich#27469)
- fix(mobile): ignore pointer events on toasts by [@&#8203;uhthomas](https://github.com/uhthomas) in [#&#8203;26990](immich-app/immich#26990)
- fix(mobile): reset video controls hide timer when showing controls ch… by [@&#8203;uhthomas](https://github.com/uhthomas) in [#&#8203;26985](immich-app/immich#26985)
- fix(mobile): don't update search filters in-place by [@&#8203;uhthomas](https://github.com/uhthomas) in [#&#8203;26965](immich-app/immich#26965)
- fix(web): isFullScreen initial value check is incorrect by [@&#8203;midzelis](https://github.com/midzelis) in [#&#8203;27520](immich-app/immich#27520)
- fix(mobile): transparent system navbar when trash bottom bar is visible by [@&#8203;putuprema](https://github.com/putuprema) in [#&#8203;27093](immich-app/immich#27093)
- fix: timestamp handling for database backup in Web UI by [@&#8203;AfonsoMendoncaRibeiro](https://github.com/AfonsoMendoncaRibeiro) in [#&#8203;27359](immich-app/immich#27359)
- fix: allow bots to access /s/ urls  by [@&#8203;domints](https://github.com/domints) in [#&#8203;27579](immich-app/immich#27579)

##### 📚 Documentation

- feat(docs): add keycloack example to oauth docs by [@&#8203;robson90](https://github.com/robson90) in [#&#8203;27425](immich-app/immich#27425)

##### 🌐 Translations

- chore(web): update translations by [@&#8203;weblate](https://github.com/weblate) in [#&#8203;27029](immich-app/immich#27029)
- chore(web): update translations by [@&#8203;weblate](https://github.com/weblate) in [#&#8203;27483](immich-app/immich#27483)

#### New Contributors

- [@&#8203;Vogeluff](https://github.com/Vogeluff) made their first contribution in [#&#8203;27297](immich-app/immich#27297)
- [@&#8203;updatemike](https://github.com/updatemike) made their first contribution in [#&#8203;27095](immich-app/immich#27095)
- [@&#8203;diiogofer](https://github.com/diiogofer) made their first contribution in [#&#8203;26980](immich-app/immich#26980)
- [@&#8203;squishykid](https://github.com/squishykid) made their first contribution in [#&#8203;26927](immich-app/immich#26927)
- [@&#8203;Phlogi](https://github.com/Phlogi) made their first contribution in [#&#8203;25316](immich-app/immich#25316)
- [@&#8203;saurav61091](https://github.com/saurav61091) made their first contribution in [#&#8203;26898](immich-app/immich#26898)
- [@&#8203;putuprema](https://github.com/putuprema) made their first contribution in [#&#8203;27282](immich-app/immich#27282)
- [@&#8203;ffchung](https://github.com/ffchung) made their first contribution in [#&#8203;27346](immich-app/immich#27346)
- [@&#8203;chanb22](https://github.com/chanb22) made their first contribution in [#&#8203;24182](immich-app/immich#24182)
- [@&#8203;robson90](https://github.com/robson90) made their first contribution in [#&#8203;27425](immich-app/immich#27425)
- [@&#8203;okxint](https://github.com/okxint) made their first contribution in [#&#8203;26903](immich-app/immich#26903)
- [@&#8203;johnmaguire](https://github.com/johnmaguire) made their first contribution in [#&#8203;27305](immich-app/immich#27305)
- [@&#8203;ray](https://github.com/ray) made their first contribution in [#&#8203;27529](immich-app/immich#27529)
- [@&#8203;AfonsoMendoncaRibeiro](https://github.com/AfonsoMendoncaRibeiro) made their first contribution in [#&#8203;27359](immich-app/immich#27359)
- [@&#8203;domints](https://github.com/domints) made their first contribution in [#&#8203;27579](immich-app/immich#27579)

**Full Changelog**: <immich-app/immich@v2.6.3...v2.7.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9naXRodWItcmVsZWFzZSIsInR5cGUvbWlub3IiXX0=-->

Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/101
Co-authored-by: bot-owl <bot@erwanleboucher.dev>
Co-committed-by: bot-owl <bot@erwanleboucher.dev>
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.

Live fotos are downloaded as VIDEO on SHARED ALBUM

4 participants