Archived topic
Avoid an excessive DOM size
3 replies · Started by Matias on February 13, 2021
Hello.
Im having this issues with my web:
<body class="home blog wp-custom-logo wp-embed-responsive post-image-below-header post-…" itemtype="https://schema.org/Blog" itemscope="">
My logo isnt in lazy load mode.
How can I solve It?
Thanks
Hi there,
i just tested your site on PSI - and there is no issue with the DOM size it is under the Passed Audits.
Your LCP is high. This is because the LCP element Google is measuring is your first featured image. Which is being Lazy Loaded.
Looks like you're using WP Rocket Lazy loader - which allows you exclude images based on a CSS Class. So try adding the PHP Snippet i have here:
https://gist.github.com/diggeddy/9a04315d7cfc834e8efe87e1ce653df7
Then you can use the skip-lazy class to stop the first featured image from lazy loading
Thank, I will do it.
Have I paste the code provider in function file or using Code Snipper Plugin?
The Code Snippets plugin or if you're using a Child Theme you can add it to the Child Theme functions.php