Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi there,

    the two most common contributors to CLS that we see are:

    1. Lazyloading Logo images. Most Lazy Loaders allow you to exclude images from lazy loading using a specific CSS Class. You can use is-logo-image

    2. Critical (Optimized) CSS – enabling the automatic featured in a cache plugin will cause problems. Unless you know how to manually write your own critical CSS, you should disable this option.

    Thread Starter Sayan Dutta

    (@sayandutta)

    Not CLS.
    I am facing a problem with the LCP image.

    The LCP element listed in Page Speed Insights is the Featured image of the first post. As you’re using a Lazy Loader plugin that image is being loaded later. You would need to speak to the lazy loader plugin author how you can disable lazy load for the first featured image.

    Thread Starter Sayan Dutta

    (@sayandutta)

    They have something like this
    https://docs.ewww.io/article/74-lazy-load

    I am using EWWW Image Optimize

    try adding this PHP snippet to add the skip-lazy class to the first featured image:

    function skip_lazy_class_first_featured_image($attr) {
        global $wp_query;
        if ( !is_single() && 0 == $wp_query->current_post ) {
            $attr['class'] .= ' skip-lazy';  
        }
        return $attr;
    }
    add_filter('wp_get_attachment_image_attributes', 'skip_lazy_class_first_featured_image' );

    How to add PHP: https://docs.generatepress.com/article/adding-php/

    Thread Starter Sayan Dutta

    (@sayandutta)

    I have removed it with the help of EWWW. But now something other is causing the problem..

    https://prnt.sc/ztd3yo

    Please check. I can’t understand what is happening.

    Your content is still being lazyloaded.
    If you right click and inspect the site you will see most of your content has the lazyloaded class attributed to them.
    Presumably this is an option in your cache pliugin.

    Thread Starter Sayan Dutta

    (@sayandutta)

    So what I can do I have tried everything still cannot figure out this thing.

    Thread Starter Sayan Dutta

    (@sayandutta)

    I totally turned of the lazy loading just see. Still it’s showing the same.

    Elvin

    (@ejcabquina)

    Hi there,

    I’ve rechecked your site and it doesn’t seem like lazyloading is turned off as its still being added to your site’s elements as shown here:
    https://share.getcloudapp.com/bLugdQ98

    Note: This isn’t something the theme controls. Consider asking your plugin’s support on how to do this. ??

    Thread Starter Sayan Dutta

    (@sayandutta)

    I tried turning off the Lazy Loading fully. Still, the problem was not resolved.

    You’re site is still adding lazyload classes throughout its content:

    https://www.screencast.com/t/8crEhh7W1wI

    I suggest you check with WP Rocket support on how to configure the plugin correctly.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Largest contentful element painted within the viewport’ is closed to new replies.