• Resolved Aashish Pahwa

    (@feedough)


    Hello

    My featured image appears above the fold. The problem with AMP is that it lazy loads that image making the LCP score go down.
    Is there a way to un-lazy load featured image on AMP pages?

    I use generatepress theme.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @feedough

    Thank you for the support topic, it will be helpful if you share your site URL, so we can determine which image needs tweaks

    here are few tips to improve :

    1) Disable native lazy loading for that image by setting ‘loading’ attribute to false eg: check wp_get_attachment_image params

    2) if it’s already not present please add data-hero-candidate attribute.

    3) Use this mini plugin to preload the hero images.

    Hope this helps!

    Plugin Author Weston Ruter

    (@westonruter)

    Relatedly, this is an issue with WordPress Core as well: https://make.www.ads-software.com/core/2021/07/15/refining-wordpress-cores-lazy-loading-implementation/

    Assuming that AMP Optimizer has done server-side rendering of the featured image as a hero, it’s likely that it includes loading=lazy. So yes, as Milind suggested you should make sure that loading is set to false when the featured image is rendered in WP.

    We’d be able to know more by seeing your site.

    Thread Starter Aashish Pahwa

    (@feedough)

    Hello

    Here’s the post link.

    Plugin Support Milind More

    (@milindmore22)

    Hello @feedough

    Thanks for the link, I don’t see feature images is being lazy loaded, however, The Preload image is different than the actual image served.
    the preloaded image is cuttles-startup-review-1.png and actual image used in <amp-img> tag is cuttles-startup-review-1-808x455.png

    Are you using the mini plugin I mentioned in the previous reply?

    Additionally, please use properly sized and optimized images, we will recommend using webp image format.

    @feedough As we haven’t received a response, I’ll mark this as resolved. Feel free to open a new support topic if you continue to encounter issues, or reopen this topic and we’d be happy to assist. Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to not lazy load the first featured image’ is closed to new replies.