Guides/Create content/Media/Gallery block

Gallery block

Last reviewed on August 3, 2026

The Gallery block contains individual Image blocks for each image and arranges them attractively. Our guides will show you how to add and customize galleries on your site.

Video tutorial

In this video, you’ll learn how to use the Gallery block on your WordPress.com site to display several images together in a grid. It covers controlling the number of columns, spacing, links, and captions.

Use the Gallery block to display several images together in a tidy grid, instead of stacking them one below another. A gallery works well for photo collections, product photos, portfolios, event recaps, and team pictures.

You control how many columns the grid uses, the spacing between images, and whether each image links to its full-size version or another location. You can also add a caption and alt text to every image in the gallery.

A Gallery block showing three images in a single row.
Galleries can arrange images in a wide variety of attractive formats

Working with galleries

The following guides cover everything you can do with the Gallery block:

Show attached media automatically

A Dynamic Gallery automatically shows every image attached to the current post or page, and it updates as you attach or remove media. Use it when you want a gallery that stays in sync with the post’s media instead of choosing each image yourself.

To show attached media automatically, follow these steps:

  1. Edit the post or page where you want the gallery.
  2. Add a Gallery block: click the + block inserter, search for Gallery, and select it.
  3. In the new Gallery block, click “Use attached images”. The gallery fills with every image attached to the post or page:
An empty Gallery block with the "Use attached images" button.

The gallery shows the attached media in the editor and on your published page, and it updates on its own as you attach or remove images.

To choose the images yourself instead, convert the gallery back to a regular gallery. Click “Convert to images” in the block toolbar, or open the block settings sidebar and click “Convert to individual images”.

Was this guide helpful for you?

Not quite what you're looking for? Get Help!

Copied to clipboard!