Skip to content
LyEve UI v0.60.1

Visitor sites

Image

An image whose box is reserved before its bytes arrive, so the text under it never moves. It is part of site.css.

With its own size

Give both width and height and the image keeps its own shape:

Dunes at dusk

Cropped to a ratio

Without a size the image is cropped to ratio, 16:9 unless you name another. A caption puts it in a figure:

A pine forest
The north trail

API

PropTypeDefaultDescription
src requiredstring no defaultThe image URL.
alt requiredstring no defaultWhat the image shows. An empty string marks it decorative.
width number no defaultThe image's own width in pixels.
height number no defaultThe image's own height in pixels.
ratio '1/1' | '4/3' | '3/2' | '16/9''16/9'The box an image without both width and height is cropped to.
caption string no defaultDrawn under the image, in a figure.
loading 'lazy' | 'eager''lazy'eager for an image a reader sees before scrolling.
class string no defaultExtra classes on the image or figure.