Site logo

Archived topic

YouTube embed on a container creates CLS

5 replies · Started by Josue on December 11, 2021

Viewing posts 1–6 of 6

Hi guys,

I've embed a Youtube video on my website: https://mayangateway.com/ - but I guess I am not doing something right with the dimensions of the container because it has creates a CLS of 0.011

Just so you know, I'm using the Perfmatters plugin to lazy load the iframe/video, and I've enabled the preview thumbnail feature of Perfmatters to swap out the YouTube iframe with a preview thumbnail. The video is then loaded on click.

Would you guys please help me solve this CLS? I've been testing different solutions but I haven't found the right one.
Thank you in advance,
Josue

Hi Ying,

Thank you for your answer. I haven't solved the problem. There is CLS which you can see in GTmetrix and light house:

Gtmetrix: https://mayangatewayimages.b-cdn.net/Screenshots/Screen%20Shot%202021-12-13%20at%2009.58.39.png
Lighthouse: https://mayangatewayimages.b-cdn.net/Screenshots/Screen%20Shot%202021-12-13%20at%2009.58.18.png

The CLS issue is also shown in the CLS extension of Chrome: https://mayangatewayimages.b-cdn.net/Screenshots/Screen%20Shot%202021-12-13%20at%2010.00.55.png

It only happens because I have added the video. I'm guessing I am not doing something correctly with the dimentions but I don't know what.

Hi there,

i ran a test against the site and across several tests there was the occassional CLS response. The highest CLS was 0.008 - which you should simply ignore as it is well within the Core Web Vitals guidelines.

It really isn't a problem but if you must chase it down then you may want to speak with PerfMatters as it looks related to the Lazy Loading.

Hi David, I understand. Because it is withing the Core web vital guidelines, I'm just going to ignore it. Thank you for checking and for your help as always.

You're welcome!

This archived topic is closed to new replies.