[Feature] Support for captureIdentifier (PhotoIdentifier/DocumentID) to group photo variants #stacking #versions #edits #21118
Closed
trommegutten
started this conversation in
Feature Request
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have searched the existing feature requests, both open and closed, to make sure this is not a duplicate request.
The feature
Description
Immich today assigns a unique asset ID per file, which works well for file uniqueness.
What is missing is a systematic way to detect that multiple files are variants of the same photo capture (e.g. iOS original + portrait edit, or RAW + exported JPEG).
Without this, stacking relies on manual action or fragile heuristics (like filenames + timestamps).
⸻
Proposed behavior
On import (XMP sidecar takes precedence if present), Immich should ingest a capture identifier in this priority order:
1. PhotoIdentifier (Apple, HEIC/ProRAW)
2. XMP:DocumentID (Adobe/XMP workflows, some Android/RAW)
3. If neither exists → autogenerate a new UUID and store it as captureIdentifier
If two or more assets share the same captureIdentifier:
• Suggest auto-stacking (non-destructive, reversible).
• Use the identifier for duplicate review and version management.
Database change:
• Add one nullable field to asset:
• captureIdentifier TEXT NULL
⸻
Why not use other metadata IDs?
Several existing fields are not reliably unique or stable enough:
• Exif:ImageUniqueID → Often missing, reused, or inconsistently written by vendors.
• Filename + timestamp → Altered by export, AirDrop, editing, timezone shifts.
• XMP:InstanceID → Changes on each save; cannot link original + edits.
• Device/local IDs (e.g. deviceAssetId) → Platform-specific, not portable, don’t survive migration.
• Heuristics (time + camera model + GPS + perceptual hash) → Helpful as fallback, but probabilistic; can misgroup bursts or HDR brackets.
⸻
Why PhotoIdentifier and DocumentID?
• Apple PhotoIdentifier → 128-bit UUID that remains constant across original + edited/portrait variants. Represents one capture.
• XMP DocumentID → Stable 128-bit UUID persisting across edits/exports in RAW/Adobe workflows.
Both are true UUIDs:
• Length: 128 bits
• Possible combinations: 2^122 ≈ 5.3 × 10^36 (practically collision-free)
They are deterministic, extremely collision-resistant, and widely used in real workflows.
They align with Immich’s non-destructive policy: multiple versions, one capture.
When these are missing, an autogenerated captureIdentifier ensures every asset still belongs to a capture group, even if only containing itself.
Platform
Beta Was this translation helpful? Give feedback.
All reactions