• Resolved Nur Islam

    (@nurjoyislam)


    WordPress 5.5 has enabled lazy loading for images. I have activated lazy loading for images on Smush.
    Now the lazy load is conflicting.
    Should I disable the core lazy loading with the code below?

    add_filter( ‘wp_lazy_loading_enabled’, ‘__return_false’ );

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @nurjoyislam

    I hope you are doing good today.

    Please note that using the same feature twice on the same site could cause issues.

    I made a review of this code and I can confirm this disable WP core lazyload for images.

    The best solution will be to add this in your child theme functions.php file so that this code will be not lost in your main theme update.

    Kind Regards,
    Kris

    Thread Starter Nur Islam

    (@nurjoyislam)

    Hi @wpmudevsupport13
    Thank you for your reply. I already added this code to the child theme’s function. And it is working well.
    And I was just confirming that, is this enough to work the plugin properly or something else I need to add! You cleared my query.

    Will the future update of the plugin will automatically disable the WP core lazy load function when someone will enable the lazy load option on the plugin? Like almost all the SEO plugins disabling the core sitemap if the sitemap featured is enabled on the SEO plugin.

    Regards,
    Nur Islam

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @nurjoyislam

    I hope you are doing well.

    We have the option to disable the Native Browser Lazy Load from the plugin interface, however, I also sent this request to our developers to check if we have plans to add enable this filter from the plugin interface.

    Best Regards
    Patrick Freitas

    Nur, I’m not sure why plug-in support suggested you should disable a core feature so their plug-in works. I can assure you you almost certainly do not want to do that. Instead, you want to make sure the native lazy-loading added in WordPress 5.5 is working as best you can which means adding a width and height to the images on your site. I’m not certain but I believe Force Regenerate Thumbnails may help you accomplish the addition of the width and height. Keep in mind browser support for native lazy-loading still isn’t perfect. Right now if you’re primary users are on iOS using Safari, for example, native lazy-loading still doesn’t work so you’re going to need to figure out a way to find a solid middle ground with any lazy-loading plug-in that you do use. With a good plug-in we can expect the plug-in authors will balance things out to provide the best experience.

    • This reply was modified 3 years, 3 months ago by Josh Habdas.
    Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    Hello @jhabdas

    Nur, I’m not sure why plug-in support suggested you should disable a core feature

    Answer is simple, so you can use Smush Lazy Load instead of native WP Lazy Load, as having both may bring conflicts. 🙂

    This is why we also added a new option to enable native WP lazy load if needed, without having to add filters on your child theme.

    Nothing wrong with that, and I also really anticipate lazy loading becoming part of browsers so web devs do not have to worry about that.

    Thank you,
    Dimitris

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Conflict with core lazy load on WordPress 5.5’ is closed to new replies.