Site logo

[Resolved] Lazy load feratured image with W3 and Autoptimize

Home Forums Support [Resolved] Lazy load feratured image with W3 and Autoptimize

Home Forums Support Lazy load feratured image with W3 and Autoptimize

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2129047
    Mattias

    Hi

    Read a lot of threads with similar question but none that can help me.

    I have both W3 and Autoptimize.
    Lazy load is turned off in setting for both.
    Still, my featured images loads lazy on desktop.

    What am I missing?

    Thanks!
    Matt

    #2129101
    David
    Staff
    Customer Support

    Hi there,

    WP 5.7 (?) added browser native lazy loading to images.
    It could be that ? If you can share a link to the site i can take a look .

    #2129366
    Mattias

    Thanks David, this page https://cruisetrail.com/best-ships-msc-cruises/ is one of many offenders…

    Thanks again
    Matt

    #2129406
    David
    Staff
    Customer Support

    That image does have the loading="lazy" attribute which is what WP adds.
    You can turn that off using this PHP Snippet:

    add_filter( 'wp_lazy_loading_enabled', '__return_false' );

    #2129435
    Mattias

    Thanks, worked. Super!

    Time for me to look into creating a child theme.

    Thanks again,

    Mattias

    #2129464
    David
    Staff
    Customer Support

    Glad to be of help.

    INFO on Child Theme:
    https://docs.generatepress.com/article/using-child-theme/

    Doc contains link to a blank starter child theme.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.