Use small-size thumbnail of featured image when building archive page in Layout builder

Hello,

I’m building a three column Archive page with the default sections, rows and columns in Layout builder and I would like to retrieve the Featured image of my posts as thumbnails. As these Featured images are quite large (250-500 kB), it takes a while to load the Archive page. What I would like, is to retrieve smaller sized thumbnails of Featured images in my Archive page, just like how Wordpress itself creates smaller sized versions of Featured images. Is that possible?

Thanks in advance!

Regards,

Hugo

Hello Hugo,

Thanks for writing to us.

You can set the featured image size in the dynamic content {{dc:post:featured_image_id size="medium"}} .

We have a way to apply a thumbnail size in some cases but it’s a bit of a workaround.

  • Under preferences, enable the Dev Console.
  • Inspect and Image element and open the console
  • Look for image_source and enter {{dc:post:featured_image_id size="medium"}} That size attribute accepts any thumbnail size and will default to full if not set.

This should work for any of the image controls in the builder but because it is just retrieving the attachment ID you can use it for any inline <img> tags that you add directly to your content.

If it doesn’t work for you, please share your details in a secure note. Please provide the following details

  • WordPress Login URL
  • Admin level username and password
  • Exact Layout URL

You can find the Secure Note button at the bottom of your posts

Hope it helps
Thanks

It works!

So, this attribute uses the default Wordpress sizes for thumbnails?

Hello Hugo,

Yes by default it renders the full-size post featured image but you can pull image size by the dynamic content code. Glad that it is working fine for you. Please feel free to open a new thread if you have any more concerns.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.