Archived topic
Problem with Cumulative Layout Shift
3 replies · Started by steven on January 27, 2022
Hi there,
I I created a wordpress site a month ago with generatpress. But I just realized that I have a "Cumulative Layout Shift" problem I don't understand, I'm not an expert, can you help me please?
Hi there,
first thing to check for is a CSS optimization issue. You can do this by disabling any optimization plugins on the site, and retesting your post. As you're using WP Rocket i can test a page with and without it enabled:
With WP Rocket:
Without WP Rocket ( by adding ?nowprocket query string to the URL ):
So we can see WP Rocket is causing some issues. I have check the thumbnail filmstrip the first report provides i can see the Logo is being distorted, and futher down the report it shows the Navigation element ( which is below the logo ) is being shifted.... so lets eliminate the logo size issue.
See here:
https://docs.wp-rocket.me/article/15-disabling-lazy-load-on-specific-images
It explains how to exclude an image, in the field provided add this class: is-logo-image
Do that, clear any caches, and retest the site.
Let us know
Thanks you David, il will try
Let us know how you get on