A caption is the short line of text shown below an image. It’s the place to say who’s in a photo, where it was taken, or who took it, and it’s often the first thing people read when they skim a post. For my hiking posts, I use the captions to tell the reader where exactly a photo was taken – a detail often not obvious from the photo itself, or the surrounding paragraphs.
A caption isn’t the same as alt text. Alt text describes the image for people who can’t see it, like screen reader users, and it’s hidden from everyone else. The caption is visible to everyone. Most images need alt text, but only some need a caption.
In this tutorial, we’ll add captions to images and galleries, change how captions look across your whole site, and remove them when you don’t want them.
Add a caption to an image
- Select the Image block.
- Click “Add caption” in the block toolbar. It’s the icon containing a frame with three dots at the bottom.
- Type the caption in the field that shows up below the image.

The caption is regular text, so you can make words bold or italic, or add a link, the same way as in a paragraph. A link is handy for photo credits, or maybe the license if you make your photos available under Creative Commons.
Captions from the Media Library
Every image in the Media Library also has a “Caption” field. If you fill it in, the caption is added automatically each time you insert that image into a post. That saves time for images you use more than once, like a logo or a portrait.
It only works one way, though. Changing the caption in the Media Library later doesn’t update the posts where the image is already used, and changing a caption in a post doesn’t change it in the Media Library.
Add captions to a gallery
A Gallery block can have captions in two places: on each image, and one for the gallery as a whole.
- For an image in the gallery, select the image inside the gallery and click “Add caption” in its toolbar, just like for a single image.
- For the whole gallery, select the Gallery block itself and click “Add caption” in its toolbar. That caption goes below all of the images.

In most themes, the captions on images in a gallery are shown on top of the image, at the bottom, with a dark gradient behind them so they’re readable. That’s the default WordPress style for gallery image captions. It works for a few words, but longer captions cover a lot of the image. If you need more than a line, use the gallery caption instead, or a paragraph below the gallery.
Change how captions look
Captions get their look from your theme, usually a smaller and lighter version of the font used for running text. In a block theme, you can change that for every caption on your site at once:
- Go to “Appearance” → “Editor” → “Styles”.
- Open “Blocks & Elements” and select “Caption”.
- Change the font, size, line height, letter case or color.

On WordPress 7.1 and earlier, you’ll find Captions under “Typography” and “Colors” instead. The change applies to captions on images, galleries, videos, tables and embeds, since they all use the same caption style. When changing the caption text color, keep in mind that the caption might be displayed on top of different background colors.
If you build themes, the same settings go in theme.json, under styles.elements.caption:
{ "styles": { "elements": { "caption": { "color": { "text": "var(--wp--preset--color--contrast)" }, "typography": { "fontSize": "var(--wp--preset--font-size--small)" } } } }}
The color and font size slugs depend on your theme, so use the ones it defines. To style captions in a classic theme, use CSS on the .wp-element-caption class, for example in “Appearance” → “Customize” → “Additional CSS”.
Remove a caption
To remove a caption from an image, select the Image block and click “Remove caption” in the block toolbar, where “Add caption” was. Deleting the text in the caption field works too.
If an image keeps getting a caption you don’t want, it’s probably coming from the “Caption” field in the Media Library. Clear it there to stop it from being added the next time you use the image.
What about featured images?
The Featured Image block that block themes use to show a post’s featured image doesn’t show captions at all, even when the image has one in the Media Library. If you want a caption on the image at the top of a post, the simplest way is to add it as an Image block at the start of the post instead. For more on featured images, see how to find the right featured image size.