How to change the lazy loading property from woocommerce?

Viewed 27

My website is too long to charge, and apparently, it's caused by image lazy-loading. When I inspect the element (the image on the front page), I get :

<img width="300" height="300" src="https://miro-labo.com/wp-content/uploads/2022/08/Capture-decran-2022-08-19-131727-300x300.png" class="attachment-woocommerce_thumbnail size-woocommerce_thumbnail" alt="" loading="lazy" srcset="https://miro-labo.com/wp-content/uploads/2022/08/Capture-decran-2022-08-19-131727-300x300.png 300w, https://miro-labo.com/wp-content/uploads/2022/08/Capture-decran-2022-08-19-131727-150x150.png 150w, https://miro-labo.com/wp-content/uploads/2022/08/Capture-decran-2022-08-19-131727-100x100.png 100w" sizes="(max-width: 300px) 100vw, 300px">

What file (PHP or js?) do I need to edit to remove the loading="lazy"? I am a little new to coding so please forgive my lack of knowledge ;)

1 Answers

You can put add_filter( 'wp_lazy_loading_enabled', '__return_false' ); in your theme's functions.php file Or can use any available plugin for Disable Lazy Loading and if you're using Jetpack or any other optimization or Cache plugin that enable lazy loading then you can turn off lazy load settings on those plugin options.

Related