How to disable lazy load in WordPress?

WordPress in its 5.5 version introduced lazy loading of images natively without the need for an external plugin. Since modern browsers already allow this lazy loading feature, WordPress added support for that loading tag.

To achieve this lazy loading of images all you need to do is insert the loading=”lazy” tag inside the image tag as mentioned below:

<img src="https://example.com/image.jpg" loading="lazy" />

This feature is useful to many websites, but some sites do not want to use this feature. Sites like images and wallpapers site often avoid lazy load feature.

To disable lazy loading just add the below code in theme’s function.php file.

Note: Always make a backup your site if you don’t know what you are doing!

add_filter( 'wp_lazy_loading_enabled', '__return_false' );

Once the above code is added, just clear the cache and visit the site’s front end. Now the tag of the lazy load is gone and none of the images is lazy loading.

Published by AtulHost

Creator of AtulHost. An ardent Linux user. Comes from a business management background. Loves to do research on modern business insights and enterprise solutions like career, education, finance, investments ideas, marketing strategies, and productivity skills; technological trends like automation, artificial intelligence, cloud and edge computing, computer hardware and networking, data science, and the internet of things.

Join the discussion

Required fields are asterisked and email address will not be shared.

Ensure a friendly atmosphere to our members and visitors. Encourage the freedom of expression and exchange of information. Comments that are off-topic will be deleted.