Documentation

Last updated: 2026-08-11

Captions on the photo frame

An e-paper frame on the wall shows a photo — and now, if you want, a line that says when and where it was taken. The photoframe endpoint draws a caption into the bottom-left corner of every frame it serves, rendered from a template the device sends along with its request.

One header, your format

The frame asks for a caption with a single request header carrying a Handlebars template:

X-Subtitle-Template: {{year}} {{location}}

The template renders against the photo being served. {{year}}, {{month}}, {{day}} and {{date}} come from the capture time in the photo's local timezone — the moment the shutter clicked, not the moment the file was uploaded. {{location}} is the place name AI enrichment attaches to geotagged photos, {{description}} and {{name}} round out the set. Absent values render as empty text: with the template above, a photo without a location simply shows its year. A caption that comes out entirely empty leaves the picture untouched.

Readable on any photo

A fixed text color would vanish on the wrong picture. The caption is drawn with a drop shadow, and the text and shadow colors flip based on the brightness of the exact region the text covers — dark text with a light shadow over a bright beach, light text with a dark shadow over a night shot. The text is rasterized from a font embedded in the binary, scales with the panel, and is drawn before dithering, so it comes out crisp in the panel's native format on Spectra 6 and grayscale panels alike.

Captions stay current

Rendered frames are cached once per photo and configuration, and the cache key covers the rendered caption text itself. When enrichment attaches a location to a photo that didn't have one yet, the next fetch re-renders the frame with the completed caption — the cache serves stale pixels for exactly as long as they are correct, and not a moment longer. Devices that send no template get byte-identical output to before: the caption only exists for frames that ask for it.

updates backend photos photoframe