Skip to content

Enhanced Images

Enhanced Images turns a Markdown link containing exactly one image and ending in #lightbox into a lightbox trigger. Selecting the thumbnail opens the linked image in a dialog fitted to the available space. The viewer supports zoom, pan, and reset; close it with the close button or Escape. Regular images and image links without #lightbox keep their normal behavior.

The enhancement requires Astro’s Sätteri Markdown processor. If another processor is configured, the theme skips it.

The enhancement is controlled by features.enhancedImages, which defaults to true. Set it to false to disable it; see Customization: Theme options for the configuration reference.

Starlight illustration

Starlight illustration linking to the home page

Add #lightbox to the end of a link containing exactly one image. The thumbnail shows a detail of the illustration; the dialog opens the linked image without the fragment.

Use Ctrl/Command plus the mouse wheel, the zoom controls, or a two-finger pinch to zoom the image without zooming the page. Drag the zoomed image with a mouse or touch to pan it. The reset control restores the fitted view; the close button or Escape closes the dialog.

[![Detail of the Starlight illustration](../../../assets/hero-thumbnail.webp)](/lightbox-example.webp#lightbox)

Use the #lightbox fragment on its own to display the same image as the thumbnail. Images already inside a dialog are not enhanced.

[![Starlight illustration](../../../assets/hero.webp)](#lightbox)
100%