PhoenixKit 2.59.0: Photo EXIF, GPS search on a map and per-language file details
PhoenixKit 2.59.0 keeps the camera details and GPS position of uploaded photos, makes files searchable by map area, and lets you edit a file’s title, alt text and description in every language from one form.
Camera and location
The upload job now records a photo’s camera, exposure, dates and GPS position. The camera’s serial number and maker note are not kept. The position is stored in its own indexed columns, so code can list files inside a map area with bounds: {south, west, north, east}, including areas that cross the antimeridian. Plain Postgres is enough; PostGIS is not needed.
A Camera & location panel on the admin media detail page and in the viewer’s sidebar shows these details, with a Show on a map link and All EXIF for the full dump. Photos uploaded before this release are read on request with Read EXIF, and Read again refreshes them.
File details in every language
Title, alt text and description now have one form with a tab per language and one Save, in the viewer’s sidebar and on the detail page. Switching tabs keeps what you typed, a tab with no text yet carries a dot, and a language you did not change is left as it is, so another editor’s later save of it survives. The detail page also shows a picture’s size in megapixels.
Fixes
A badly written camera tag can no longer stop an upload or break the viewer: huge numbers are bounded, a GPS date must be a real date, and text that is not valid UTF-8 is dropped.
Upgrading
Run mix phoenix_kit.update for V215. It adds two nullable columns and an index to the files table; no existing file changes, and no database extension is needed.
Full release notes: PhoenixKit 2.59.0
2.59.0 · 9 October 2026
Migration V215 (run mix phoenix_kit.update). It adds two nullable columns and a partial GiST index on
phoenix_kit_files; no existing file changes, and no extension is needed.
Added
- A photo’s EXIF is kept, and its GPS position is searchable on a map (V215). The upload job records the
camera, exposure, dates and GPS position in
metadata["exif"](Storage.Exif.summary/1; the camera’s serial number and the maker note are not kept) and the position inphoenix_kit_files.latitude/longitude, indexed by a partial GiST index onpoint(longitude, latitude)(built-in Postgres, no PostGIS).Storage.list_files_in_scope/2takesbounds: {south, west, north, east}, a box that crosses the antimeridian is searched as two (Storage.Geo), andGeo.parse_bounds/1reads one from a URL or form. A photo uploaded before this is read on request:Storage.read_exif/1(recorded only while the bytes read are still the file’s original) andStorage.exif_tags/1(the whole dump, read from the original, never stored). An edited image is read from its unedited backup. - A “Camera & location” panel on the admin media detail page and in the viewer’s sidebar
(
Core.FileExifPanel): camera, exposure, dates and position, a “Show on a map” link, All EXIF and Read EXIF / Read again. The viewer offers it only where it offers the title editor, and the buttons that record also need a file the host may write. - Title, alt text and description in every language from one form (
Core.FileDetailsFields): a tab per language, one Save, in the viewer’s sidebar and on the detail page. The tabs switch in the browser, so what was typed in another language is kept; a tab with no text yet carries a dot.Storage.update_file_details_languages/3writes all languages and the tags in one held write and leaves a language that did not change as it is, so another editor’s later save of it survives.FileDetails.by_language/3reads what a form posted. - A file’s size in megapixels (
Shape.megapixels/2) on the detail page.
Fixed
- A tag a camera writes badly can no longer stop an upload or break the viewer. A number of hundreds of
digits, a GPS date or time that is not a date or a time, and text in a legacy encoding (not UTF-8, which
JSON cannot store) were read as-is; oversized numbers raised in the upload job and in “All EXIF”, invalid
timestamps were stored, and invalid text made the summary unwritable. Numbers, including exposure-time
fractions, are bounded, a GPS timestamp must be a real calendar date and time, and bytes
that are not valid UTF-8 are dropped where the tags are read (
CaptureDate.parse_exif_properties/1). Geo.parse_bounds/1no longer raises on a coordinate of hundreds of digits (it reaches a URL).- Map bounds wrap correctly after panning several worlds west, including boxes crossing the antimeridian.
- Saving a language form preserves newer edits to untouched fields. Both editors compare with the text the form initially showed; correcting a validation error also keeps the other changes awaiting save.
FileDetails.by_language/3drops a value that is not text (a client can post a nested map), instead of putting it in the form to render.
i18n
- New strings (language tabs, EXIF panel, dimensions) in all seven locales.
PhoenixKit 2.59.0. Install or update: {:phoenix_kit, "~> 2.59"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.