ESPHome’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/esphome/esphome.io/llms.txt
Use this file to discover all available pages before exploring further.
image component lets you embed static graphics directly into your device’s firmware and draw them on any compatible display. Images are converted to the target pixel format at compile time and stored in flash memory, so no SD card or external storage is needed. You can load local files, Material Design Icon SVGs, or even remote URLs — all processed automatically when you compile your project.
Minimal Example
Configuration Variables
The image source. Options:
- Local file: path relative to your YAML file (e.g.
"images/logo.png"). - Material Design Icon:
"mdi:icon-name"— automatically downloaded from Pictogrammers. - Material Design Light Icon:
"mdil:icon-name". - Memory Icon:
"memory:icon-name". - Remote URL:
"https://media.esphome.io/logo/logo.png"— downloaded at build time.
The ID used to reference the image in your display lambda (e.g.
id(my_logo)).How the image is encoded and stored in flash:
BINARY— 1 bit per pixel. Best for 1-color displays. Onlychroma_keytransparency.GRAYSCALE— 8 bits per pixel. Full gray scale.RGB565— 16 bits per pixel. Lossy color. Standard for color TFT displays.RGB— 24 bits per pixel. Full color. 32 bits with alpha channel.
Resize the image to fit within
WIDTHxHEIGHT while preserving aspect ratio. Example: "100x100".How transparency from the source image is handled:
opaque(default) — ignore alpha channel.chroma_key— a specific color is treated as transparent and not drawn.alpha_channel— full per-pixel alpha stored (not available forBINARY). Best for LVGL blending.
Invert colors (black ↔ white). Available for
BINARY and GRAYSCALE. Useful for e-ink displays. Defaults to false.Dithering method for
BINARY and GRAYSCALE types:NONE(default) — nearest color.FLOYDSTEINBERG— Floyd-Steinberg error diffusion for smoother gradients.
Byte order for
RGB565 images: little_endian (default) or big_endian. Displays and LVGL expect little-endian.Displaying Images
Draw an image in a display lambda usingit.image().
Binary Image Color Override
ForBINARY images, you can pass foreground and background colors:
Material Design Icons
Load any MDI icon by its slug. ESPHome downloads and converts the SVG automatically.Remote Images (Downloaded at Build Time)
Remote images are downloaded once at compile time and cached. They are baked into the firmware — the device does not need internet access at runtime.
Setting Defaults for Multiple Images
When most images share the same encoding, use thedefaults: shorthand to avoid repetition.
Grouping Images by Type
Transparency Options
chroma_key
A specific color (by default magenta/pink) represents transparent pixels that are skipped during rendering. The background shows through.
alpha_channel
Each pixel stores an additional alpha byte. With LVGL, this enables smooth anti-aliased blending. With the display rendering lambda, pixels are either fully drawn or fully skipped based on the alpha value.
E-Ink / E-Paper Display Example
For e-paper displays, useBINARY type with invert_alpha: true if the source has a white background that needs to be transparent.
Animation Component
Theanimation component extends image to support multi-frame GIF-like animations. Each frame is stored individually in flash.