Skip to content

hd-image

Attributes and example

hd-image

A picture: a web address (src, http or https only), one of the device’s own images by name (image, e.g. album art as albumart, a camera’s snapshot) a picture the user uploaded (upload, its id) or a person’s (person, their id: settings.who.id, people[0].id). It is fetched without referrer or cookies, loads lazily, fades in, and shows the fallback icon while it loads, when there is none and when it fails; grey on e-ink. It fills its parent, so size the element (or its parent) in CSS.

AttributeWhat it is
srcA picture on the web: an https: or http: address; anything else is ignored. A widget with a script, and a Community widget from 19 December 2026, shows it only from a host its manifest names in images (script.images with a script), or when the user typed the address in a setting.
imageOne of the device’s images by name, e.g. albumart or snapshot.
uploadA picture the user uploaded, by its id (the custom tile’s pictures). Shown only to its owner; the page fetches it and hands over an address, so the widget never sees a link.
personOne of the Homey’s people by id (settings.who.id): their picture, fetched by the page with its session; the fallback when they have none, and on a paired screen or share link.
refreshWhat the picture depends on (the track); when it changes the picture is fetched again, for apps that replace a picture without saying so.
everyFetch the device’s image no more often than once per this many seconds, however often the device renews it (a camera’s snapshot).
deviceDevice id; defaults to the widget’s own device.
fitFill the box and crop, or fit all of it inside.One of cover, contain. Default cover.
fallbackSemantic icon shown while loading, when there is no picture, or when it fails.
altDescribes the picture; without it the picture is decorative.
<hd-image image="albumart" refresh="{{ cap.speaker_track.value }}" fallback="device.speaker" alt="Album art"></hd-image>

Styling

Set CSS variables on the component element. Its internal elements live in Shadow DOM; only the exposed named parts can be styled with ::part.

--hd-ease-out
The easing of most movement.
--hd-motion-slow
A slow change, like a theme switching.
--hd-text-faint
The quietest text: hints, units, times.

Style the host

hd-image {  --hd-accent: #2563eb;  max-width: 100%;}
Theme variables