• Resolved aaron13223

    (@aaron13223)


    Hey There,

    I’ve been trying to disable lazy load for featured images, so I tried adding the no-lazy to the img tag. However, the image is still being lazy loaded. I tried a bunch of settings but I couldn’t get it to work properly. Can you please help me so that the featured image is not lazy loaded?

    I’ve added these in the exclude words:
    no-lazy
    no-lazy=
    no-lazy=””
    no-lazy=”yes”

    And this is the code used to output the featured image:
    <?php the_post_thumbnail('full', array( 'style' => 'position:absolute; top:0; left:0; width:100%;', 'alt' => ''. $featured_image_alt .'', 'no-lazy' => '' )); ?>

    This is still being added to the featured image ‘loading=”lazy”‘ despite having the no-lazy. Thanks a lot for you help.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @aaron13223

    Thank you for your inquiry and I am happy to assist you with this.
    The loading=”lazy” is a built-in WP feature since version 5.5.
    You can disable it by using a plugin to disable native lazyloading.
    Please check this link.
    W3TC adds wp-post-image lazy-loaded so loading=”lazy”is not being added by W3TC.
    I hope this helps!
    Thanks!

    Thread Starter aaron13223

    (@aaron13223)

    Hey Marko,

    Thank you so much for your help. I’m sorry that I didn’t pay anough attention to figure out that the loading="lazy" was being added by WordPress.

    Again thank you so much for helping out.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Lazy Load Exclude issue’ is closed to new replies.