Skip to content

feat(photos): uploaded photos show when and where they were taken - #354

Merged
mrramam merged 1 commit into
jherforth:mainfrom
mrramam:feat/photo-exif-details
Oct 29, 2026
Merged

mrramam merged 1 commit into
jherforth:mainfrom
mrramam:feat/photo-exif-details

Conversation

@mrramam

@mrramam mrramam commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Uploaded photos now get a date and a place for the screensaver's photo details, the way Immich photos already do.

What it does

  • On upload, the server reads the photo's EXIF with exifr: DateTimeOriginal (or CreateDate) and GPS. Bogus camera dates (before 1900, in the future, 1970-01-01) are ignored.
  • The place is looked up offline from a bundled GeoNames town list (server/assets/places/, every place of 1,000+ people, 2.5 MB, CC BY 4.0). A photo's location never leaves the server. Bigger towns reach further, so a photo in Midtown is "New York", not the town across the river. Wording matches Immich: "City, State" in the US, "City, Country" elsewhere. Nothing within 50 km means no place.
  • Photos uploaded before this are read once at startup, one at a time (readPendingPhotoDetails). Unreadable files are marked read so they aren't retried.
  • The Photos page shows "Dates on X of N · places on Y", or "Reading dates and places…" while the startup read runs.

Migration
schema37-photoDetails adds taken_on, latitude, longitude, details_read_at to homeglow_photos.

Tested

  • New tests for the EXIF reader, place lookup and routes, using synthetic EXIF JPEGs (no real photos in the repo).
  • Server 681/681, client 856/856, i18n and build pass.
  • Running on my install with 1,183 uploaded photos: the startup read took about a second, and 907 of one 980-photo source got dates, 732 got places.

server/scripts/build-places.js rebuilds the town list from GeoNames.

The screensaver's photo details (date, people, place) came only from
Immich. Uploaded photos showed nothing, though most carry the camera's
date and GPS in their EXIF.

- Uploads read DateTimeOriginal and GPS with exifr and store them
  (schema 37: taken_on, latitude, longitude, details_read_at).
- Photos uploaded before this version are read once at startup, in
  the background. A file that can't be read is marked read, so it is
  never retried.
- The place is named offline from a bundled town list (GeoNames,
  1,000+ people, CC BY 4.0, 2.5 MB), so a location never leaves the
  server. "City, State" in the US, "City, Country" elsewhere, as for
  Immich. Each town reaches further the more people live there, so a
  photo in Midtown is New York City, not the small town across the
  river. Nothing within 50 km is no place.
- The Photos page says how many photos have a date and a place, or
  that it is still reading them.

People stay Immich-only: EXIF has no names.
@mrramam
mrramam merged commit 406a2c8 into jherforth:main Oct 29, 2026
4 checks passed
@mrramam
mrramam deleted the feat/photo-exif-details branch October 29, 2026 20:29
@github-project-automation github-project-automation Bot moved this from Backlog to Done in HomeGlow Kanban Oct 29, 2026
adamecker pushed a commit to adamecker/HomeGlow that referenced this pull request Oct 30, 2026
… into test/all-combined

Upstream photoDetails migration renumbered 37 -> 43 (fork already uses 37 for routineStreakBase); fork migration numbering 28-42 preserved, including Google Tasks registrations.
@jherforth jherforth added the enhancement New feature or request label Oct 30, 2026
@jherforth jherforth added this to the 1.11 milestone Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants