PhoenixKit 2.57.0: iPhone HEIC renditions and uploads that are never lost silently
PhoenixKit 2.57.0 makes every rendition of an iPhone HEIC photo, keeps failed uploads in a problems panel to retry or resume, and adds a library switcher to the Media header.
HEIC photos get their renditions
On a real iPhone .HEIC, a rendition set to keep the original format tried to write HEIC, which ImageMagick cannot encode, and the subject finder found nothing. Such renditions of HEIC, HEIF and AVIF photos are now JPEGs, or the transparent format for a photo with transparency, and the subject finder works from a small JPEG preview. Photos already uploaded are fixed by Check every file on their rendition profile. The External libraries tab now checks that ImageMagick can read HEIC and says how to enable it.
Uploads are not lost without a word
A file over the size limit used to sit at 0%, and a failed store deleted the bytes. Now each such file is a named row in a problems panel that says why, with Retry and Discard. Received files wait in a per-user inbox until they are stored. The browser also keeps picked files, up to 250 MB each, until the server confirms receipt, so after a refresh or a closed tab it offers Resume. config :phoenix_kit, :upload_inbox_dir moves the inbox.
Media viewer and switcher
The library name in the Media and Libraries headers is now a switcher listing your own, shared and site libraries. The viewer shows Loading full quality… while a sharper version is on its way. It now preloads neighbouring photos more gently and no longer fetches their originals; large originals on a big screen load when you step onto them.
For module authors
A module’s section on the Emails page can put a button beside Preview emails. The viewer’s data-neighbor-prefetch attributes are replaced by data-neighbors.
Upgrading
No migration. Run Check every file on a rendition profile to fix HEIC photos uploaded before this release.
Full release notes: PhoenixKit 2.57.0
2.57.0 · 8 October 2026
Added
- A module’s section on the Emails Transactional page can put a button beside “Preview emails”. An entry
of
email_settings_sections/0may carrylink: %{label: "..."}, and the Branding tab then shows a button that opens the section’s tab (?tab=module_<id>);link: %{label: "...", path: "/admin/..."}leads to that path instead. The button is shown only to users who can see the section (the same permission). - The Media and Libraries page headers have a library switcher. The library name in the header is a
breadcrumb switcher listing the viewer’s own and shared libraries (and the site’s), replacing the old
<select>. Every row is a plain link to the library’s address, so the page’s own access check decides what opens. The switcher closes once the library has switched. config :phoenix_kit, :upload_inbox_dir, "/path"moves the upload inbox (default: a directory under the system temp dir). See Fixed.- The media viewer shows a “Loading full quality…” pill while a sharper version of the picture is still on its way, including on the instant stand-in a step paints first.
Changed
- The media viewer’s neighbour warming is gentler, and no longer fetches originals. It used to download the
small and large variants of both the previous and the next photo the moment the viewer opened, and, on a wide
screen, both neighbours’ multi-MB originals too, racing the sharper version of the photo being looked at. Now it
waits until the current picture has settled, runs at low fetch priority, and does nothing on data-saver or a
2G/3G line. It warms the tiny small variant of both neighbours (so a step paints at once) but the large one
only of the side being stepped towards (the next photo until you step back). Originals are no longer warmed by
core at all: whether one is worth fetching is high-end viewing, which belongs to a module. Core announces the
neighbours once settled (
pk:viewer-neighbours:prev/nextas{original, aspect},direction, and the viewerboxas{width, height, dpr}), andphoenix_kit_photoslistens. The modal’sdata-neighbor-prefetchanddata-neighbor-prefetch-hiattributes are replaced by onedata-neighbors(JSON, per side:open,large,original,aspect). Without that module, stepping onto a large image on a big screen waits for its original instead of finding it cached.
Fixed
- An iPhone’s HEIC photo now gets its subject-aware crop and every rendition. Two things failed on a real
.HEIC: a rendition with no format set (“Preserve original”) tried to write HEIC, which ImageMagick can read but not encode, so it failed (no encode delegate for HEIC); and libvips as bundled byvixhas no HEVC decoder, so the subject finder found nothing. A rendition that keeps the original format is now a JPEG (or the see-through format for a photo with transparency) when the original is HEIC, HEIF or AVIF. When libvips cannot decode a photo, the subject finder looks at a 512 px JPEG preview ImageMagick makes of it (ImageProcessor.preview_jpeg/3; it applies the EXIF orientation and keeps the usual limits). On a HEIC and its JPEG export of the same photo the stored point is the same. Photos already uploaded are fixed by Check every file on their rendition profile. - The External libraries tab checks that ImageMagick can read HEIC, with why it matters (iPhone and many Android photos), what happens without it (the photo is stored but no rendition can be made, every attempt fails) and how to enable it. It reads ImageMagick’s format list, so it works on ImageMagick 6 and 7; only reading is needed, since a rendition of a HEIC photo is a JPEG. The “not found” notice names it only once a HEIC or HEIF photo has been uploaded.
- An upload that did not land is no longer lost without a word. A file over the size limit sat as a progress bar stuck at 0% (and held one of the ten slots, so the next drop silently lost a file too), a failed store showed one anonymous count and deleted the bytes, a raise in the store took the page down with every queued file, and a refresh dropped the transfer. Now each such file is a named row in a problems panel with why (“Larger than the 500 MB upload limit”, “Up to 10 files upload at once…”) and Retry / Discard. Received bytes wait in a per-user inbox until they are stored and a failure keeps them; the browser stashes picked files (up to 250 MB each, per signed-in user) until the server confirms receipt, so a refresh or closed tab offers Resume. A Retry clicked in a browser that takes only another kind of file keeps the bytes instead of discarding them.
- An email section’s link path now goes through the shared redirect guard (
Routes.local_path?/1), so a path with a control character ("/<tab>/host", which browsers read as//host) is refused too. - The subject finder no longer leaves a preview file behind when it times out on a large HEIC.
- A kept upload’s record is written atomically, so a list made while it is being updated can no longer take it for broken and drop it.
/admin/librariesswitches to your own library when a shared one has the same slug.- HEIC detection ignores the extension’s case (
IMG_1.HEIC). - Stepping with the viewer’s on-screen arrows warms the side being stepped towards, as the arrow keys do.
- A malformed resume/retry/discard message from the browser no longer crashes the media browser.
PhoenixKit 2.57.0. Install or update: {:phoenix_kit, "~> 2.57"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.