-
Josue Ardon
Hi everyone!
I’m using the new Sizing function to avoid CLS. I generally have a decent CLS score, but I’m trying to improve the perceived CLS for user experience.
Specifically, I have a couple of pages where I have embedded videos with a shortcode like here: https://mayangateway.com/#about – I am using this plugin for the shortcode: https://wordpress.org/plugins/load-video-on-click/ which works well, the video loads only on click. This is a shortcode example:
[load_video_on_click link=”https://www.youtube.com/watch?v=AQ3FoNHC6SU” image_placeholder=”356″]
I’m using an image_place holder with these dimensions width: 640px and height 360px. And in the container – sizing, I’m also using these dimensions.
But I have CLS on my desktop as you can see here: https://webvitals.dev/cls/pmRHGHMjlx4gLq9Wr71T – how could I set the dimensions in the container to avoid the CLS? or do I have to do it on the shortcode? If so, how?
Thank you in advance for your help.
-
Hi there,
if the shortcode is inside a container then you can set a
Sizing
->Min height
to that container block -
Josue Ardon
Hi David, thank you for your speedy replay. Yes, the shortcode is inside a container. Should the Sizing -> Min height value be the same as the video’s height?
-
Hi Josue,
Yes, the min-height value should be the same as the video’s height.
- You must be logged in to reply to this topic.