Skip to content
mdbin
Documentation menu

docs/gallery

Image galleries

A gallery shows several images in one place as a slider: one image at a time, with its description laid over the bottom of the picture. Readers move between images with the dots underneath, or with the arrows that appear when they hover over the gallery. A gallery can also advance on its own, on a timer you choose.

Put [gallery] on a line of its own, then one image per line, then [/gallery] on a line of its own:

[gallery]
![The harbour at dawn](https://example.com/harbour.jpg)
![The market by midday](https://example.com/market.jpg)
![The old town at night](https://example.com/old-town.jpg)
[/gallery]
  • Leave a blank line before [gallery], as you would before a heading or a list.
  • Every line between the two markers must be an image. Blank lines between images are fine.

Descriptions

Each image's alt text — the part in square brackets — is its description. It is shown over the bottom of the image, and screen readers announce it too, so write it for someone who can't see the picture.

When you paste an image into the editor it arrives as ![image](…), so replace image with a real description.

Advancing automatically

Without options, a gallery stays on each image until the reader moves on. Add seconds to the opening marker to advance automatically:

[gallery seconds=8]
![First](https://example.com/one.png)
![Second](https://example.com/two.png)
[/gallery]
  • Each image stays up for that many seconds, then the next one is shown, returning to the first after the last.
  • The minimum is 5 seconds. A smaller value is raised to 5, so a gallery can never flick between images faster than that.
  • A value that isn't a number (seconds=fast) is ignored, and the gallery stays manual.
  • Choosing an image with an arrow or a dot restarts the countdown from that image.
  • The gallery pauses while you point at it or move keyboard focus into it, and carries on when you leave.
  • If your device is set to reduce motion, galleries never advance on their own — use the arrows or dots instead.

Gallery images are ordinary images, so everything in Images applies to them:

  • They can be pasted into the editor, linked by URL, or — from an MCP agent — an upload_image reference.
  • They are fetched, checked and stored exactly like any other image, and they count toward the same per-document image limits. A gallery doesn't buy extra images.
  • A gallery written inside a code fence is shown as code, and its images aren't fetched.

Comments

A gallery is a single block for commenting: a comment on it attaches to its [gallery] line, and the thread opens below the whole gallery.