So, I made a test: when installing the standard pack and using the default single post template, regenerating all the thumbnails after setting the medium-large wordpress thumbnail to 696x464px
This size is used here in the single-loop.php: get_the_post_thumbnail_url(null, 'medium_large'))
If I use the medium-large size for the images in the post the pictures in the post haven’t any CLS and they have a placeholder in the browser. Just the featured image has still a layout shift and no placeholder. For the featured image I couldn’t find any code that catches the size like for the other pictures.
When I use the cloud template for my single posts every image (featured image and in-post-images) shift around and have no placeholder in the browser. It seems that for the pictures used in cloud templates there is no where a get_the_post_thumbnail_url(null, 'medium_large') defined.
Can you please help me to find a solution for that problem?
Greetings Kathrin
Hello !
Please note that the Cloud Library templates are built different than standard templates and they will not always use the same pieces of code. I have brought this into our developers attention and they will take a look into it to see how this can be improved.
Thank you for bringing this up !
But is it a problem when I do not use medium_large? I always use full size, that means for my website 696×464.
Greetings Kathrin
Hi,
For images inside the post content I find that WordPress sets the width and height automatically – https://wplift.com/cumulative-layout-shift-wordpress -> https://prnt.sc/y02uv9 So basically there should be no problem there based on this information, regardless of the post template used, the content is the same. Unless perhaps when adding the images in a different way with not width/height attributes.
So for example using a standard post template https://prnt.sc/y02z19 and using a cloud template https://prnt.sc/y02zhu the images have the width/height attributes.
Thank you!
I don’t add the images in a different way but I can’t get ridd of that problem. Some images get a placeholder and other ones don’t. I don’t know why this is happening.
Greetings Kathrin