This commit is contained in:
Alan Grainger
2026-07-27 12:41:36 +12:00
parent 55bd63e3f2
commit e1a968cb99
5 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
},
"exif": {
"dateTimeOriginal": false,
"timezone": false,
"timeZone": false,
"fileName": false,
"dimensions": false,
"fileSize": false,
+1 -1
View File
@@ -81,7 +81,7 @@ const EXIF_RULES: FieldRule[] = [
if (info.dateTimeOriginal) {
out.dateTimeOriginal = info.dateTimeOriginal
// Never expose the timezone independently of the opted-in date.
if (fieldFlag('exif', 'timezone') && info.timeZone) out.timeZone = info.timeZone
if (fieldFlag('exif', 'timeZone') && info.timeZone) out.timeZone = info.timeZone
}
}
},
+2 -2
View File
@@ -97,7 +97,7 @@ describe('buildAssetMetadata', () => {
})
it('returns the photo timezone only when both date and timezone are enabled', () => {
setConfig({ ipp: { showMetadata: { exif: { dateTimeOriginal: true, timezone: true } } } })
setConfig({ ipp: { showMetadata: { exif: { dateTimeOriginal: true, timeZone: true } } } })
const meta = buildAssetMetadata(asset(), share())
expect(meta.exif?.dateTimeOriginal).toBe('2025-10-18T06:28:54.000Z')
expect(meta.exif?.timeZone).toBe('Asia/Singapore')
@@ -105,7 +105,7 @@ describe('buildAssetMetadata', () => {
setConfig({ ipp: { showMetadata: { exif: { dateTimeOriginal: true } } } })
expect(buildAssetMetadata(asset(), share()).exif?.timeZone).toBeUndefined()
setConfig({ ipp: { showMetadata: { exif: { timezone: true } } } })
setConfig({ ipp: { showMetadata: { exif: { timeZone: true } } } })
expect(buildAssetMetadata(asset(), share()).exif).toBeUndefined()
})
+1 -1
View File
@@ -186,7 +186,7 @@ describe('metadataEnabled shim', () => {
const exif = ((config.ipp as Record<string, unknown>).showMetadata as Record<string, unknown>).exif as Record<string, unknown>
expect(exif.enabled).toBeUndefined()
expect(exif.dateTimeOriginal).toBe(true)
expect(exif.timezone).toBeUndefined()
expect(exif.timeZone).toBeUndefined()
expect(exif.fileName).toBe(true)
expect(exif.dimensions).toBe(true)
expect(exif.fileSize).toBe(true)
+4 -4
View File
@@ -13,7 +13,7 @@ Show the description in the sidebar only (not as a lightbox caption), expose cam
"description": { "caption": false, "sidebar": true },
"exif": {
"dateTimeOriginal": true,
"timezone": true,
"timeZone": true,
"make": true,
"model": true,
"lensModel": true,
@@ -40,7 +40,7 @@ Every per-field flag defaults to `false`. A field is sent to the client only whe
The share owner's **"Show metadata"** toggle in Immich takes precedence over everything here: when it's off, IPP suppresses all description / EXIF / location output and hides the info sidebar (and its toolbar toggle) entirely, regardless of these settings. Note that with "Show metadata" off Immich also strips file creation dates from non-album shares, so [date grouping](/config/gallery#groupbydate) won't work for those shares.
The info sidebar (and its toolbar toggle button) only appear when there is at least one section the operator has opted into - i.e. `description.sidebar` is true, or `exif` / `location` has at least one displayable field set to `true`. Dependent flags such as `exif.timezone` do not activate the sidebar on their own. With all three groups off, the sidebar UI is suppressed.
The info sidebar (and its toolbar toggle button) only appear when there is at least one section the operator has opted into - i.e. `description.sidebar` is true, or `exif` / `location` has at least one displayable field set to `true`. Dependent flags such as `exif.timeZone` do not activate the sidebar on their own. With all three groups off, the sidebar UI is suppressed.
## Description
@@ -60,7 +60,7 @@ Under `ipp.showMetadata.exif`. Every flag defaults to `false`.
| Option | Type | Description |
|--------------------|--------|------------------------------------------------------------------------------------------------------------------|
| `dateTimeOriginal` | `bool` | Show the date the photo was taken (per EXIF), in the photographer's local time - matching Immich's own sidebar. |
| `timezone` | `bool` | Show and use the photo's timezone when formatting the date. Only applies when `dateTimeOriginal` is also enabled. |
| `timeZone` | `bool` | Show and use the photo's timezone when formatting the date. Only applies when `dateTimeOriginal` is also enabled. |
| `fileName` | `bool` | Show the original filename. |
| `dimensions` | `bool` | Show width x height and megapixel count. |
| `fileSize` | `bool` | Show the file size. |
@@ -95,7 +95,7 @@ Show the description in the sidebar only (not as a lightbox caption), expose cam
"description": { "caption": false, "sidebar": true },
"exif": {
"dateTimeOriginal": true,
"timezone": true,
"timeZone": true,
"make": true,
"model": true,
"lensModel": true,