Images and bundles
The image element, where its source may point, and how a theme carries its own artwork.
The image element draws a picture. Its url is a formula, so the source can be fixed, bundled with the theme, taken from a feed, or picked by a condition.
Where a source may point#
| Form | What it is |
|---|---|
https://… | A picture fetched over the internet, from any server. TLS only; see below. |
asset://<sha256> | A file carried inside the theme bundle. |
app-icon://<package> | The icon of an installed app. |
$item_image$ | Whatever the current repeater entry supplies. |
asset:// and app-icon:// never leave the device, so they are neither a request to a server nor something that needs permission.
https:// is the opposite: it reaches out to whoever runs that address, from the device of everyone who uses your theme. That address therefore learns something every time the picture is drawn: that somebody using this theme is looking at this page, and roughly from where. Keep that in mind before pointing an image at a server you do not control.
Plain http:// is refused outright. The launcher permits no unencrypted traffic at all, for any purpose, so an image address without TLS simply never loads, and there is no setting that turns it back on.
Fitting#
imageScale decides how the picture meets its box: crop fills and cuts (the default), fit shows all of it with margins, fill stretches, fill_width / fill_height fill one axis, inside is fit that never enlarges, none draws it at its own size.
imageAlign decides which part survives a crop: center, top, bottom, start, end, and the four corners. On portraits this is the difference between a face and a neck.
Colour#
imageTint with imageTintMode (tint, multiply, overlay, screen) recolours, imageSaturation and imageBrightness adjust, imageBlur softens the picture itself. Both of the last two are formulas, so a theme can desaturate at night:
"imageSaturation": "$dark_mode ? 0.7 : 1$"imageBlur blurs the image; backdropBlur blurs whatever is behind the element. They are different properties and both exist on purpose.
Loading#
imagePlaceholder is what shows while loading or when the source gives nothing. It is empty by default and should usually stay that way: a feed card with no picture should show a gap, not a grey box with a mountain in it. imageFadeMs softens the switch.
imageReloadSec re-fetches an image from the internet every N seconds. It is meant for fixed addresses such as a webcam or a radar map, and the launcher enforces its own floor and stops reloading while the page is not visible, so a theme cannot use it to drain a battery.
Accessibility#
imageDescription is read by screen readers. An empty description means "decorative, skip it", which is right for decoration and wrong for content. If the picture carries meaning, describe it.
Bundles#
A theme that uses its own artwork travels as a bundle: a ZIP holding preset.json and an assets/ folder, where every file is named by the SHA-256 of its own contents. The theme refers to a file by that hash, so the reference cannot go stale, a file cannot be swapped for another under the same name, and the same picture used on four pages is stored once.
A bundle is still a theme document, and the JSON inside it is validated by exactly the same rules as a bare .json theme. There is no looser path for bundled themes. The size ceilings are on limits.
Documentation for launcher 0.1.0-alpha Android 12 and later last updated