core/post-featured-image


Display a post’s featured image.

Variation 1:

Default settings.

<figure class="wp-block-post-featured-image"><img loading="lazy" width="1920" height="870" src="https://blocks.joedolson.com/wp-content/uploads/2022/09/Hero_Beatles.jpeg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" srcset="https://blocks.joedolson.com/wp-content/uploads/2022/09/Hero_Beatles.jpeg 1920w, https://blocks.joedolson.com/wp-content/uploads/2022/09/Hero_Beatles-300x136.jpeg 300w, https://blocks.joedolson.com/wp-content/uploads/2022/09/Hero_Beatles-1024x464.jpeg 1024w, https://blocks.joedolson.com/wp-content/uploads/2022/09/Hero_Beatles-768x348.jpeg 768w, https://blocks.joedolson.com/wp-content/uploads/2022/09/Hero_Beatles-1536x696.jpeg 1536w" sizes="(max-width: 1920px) 100vw, 1920px"></figure>

Variation 2:

Link and overlay added

core/post-featured-image
<figure class="wp-block-post-featured-image"><a href="https://blocks.joedolson.com/2022/09/06/core-post-featured-image/" target="_self"><img width="1920" height="870" src="https://blocks.joedolson.com/wp-content/uploads/2022/09/Hero_Beatles.jpeg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="core/post-featured-image" loading="lazy" srcset="https://blocks.joedolson.com/wp-content/uploads/2022/09/Hero_Beatles.jpeg 1920w, https://blocks.joedolson.com/wp-content/uploads/2022/09/Hero_Beatles-300x136.jpeg 300w, https://blocks.joedolson.com/wp-content/uploads/2022/09/Hero_Beatles-1024x464.jpeg 1024w, https://blocks.joedolson.com/wp-content/uploads/2022/09/Hero_Beatles-768x348.jpeg 768w, https://blocks.joedolson.com/wp-content/uploads/2022/09/Hero_Beatles-1536x696.jpeg 1536w" sizes="(max-width: 1920px) 100vw, 1920px"><span class="wp-block-post-featured-image__overlay has-background-dim has-background-dim-20 has-vivid-green-cyan-background-color" style="" aria-hidden="true"></span></a></figure>

Leave a Reply