Post Featured Image

Select, upload and display the featured image assigned to the post or page.

Block category: Theme.
Added in: WordPress 5.8

This block does not have the new image cropping capabilities or options for resizing, caption, or alternative text.

Sidebar settings

  • Link setting: Link to post.
  • Dimensions: Height, width, padding, margin, and image size.

Toolbar settings

Left, right, and center align, full-width and wide width, duotone, and replace.

HTML Markup

<!-- wp:post-featured-image /-->

<!-- wp:post-featured-image {"isLink":true} /-->


Example sizes. Note that the wrapping figure tag is part of the default output.

<figure class="wp-block-post-featured-image"><img loading="lazy" width="1200" height="675" src="(path to image)" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Post Featured Image" srcset="(path to image) 1200w, (path to image) 300w, (path to image) 1024w, (path to image) 768w, (path to image) 120w" sizes="(max-width: 1200px) 100vw, 1200px"></figure>

Tips for using the post featured image block

Removing the featured image block from a post or page does not remove the featured image from the sidebar setting.

There is no way to change the alt text of the featured image outside the media library. The default alt text is the post title.

The image size option lets you choose between the sizes that are available on your WordPress install, for example thumbnail, medium, large and full size. Plugins and themes can add or remove image sizes.