| |

How To Disable Images Lazy loading In WordPress Without Plugin

In this article, I will tell you how you can disable the native lazy loading of images on the WordPress website Without a plugin. As you know WordPress by default Lazy load all images to improve the page loading speed even if you are not using any Performance plugin. They introduced this feature in the core after the wordpress 5.5 updates. But, Lazy loading the first image that is on the viewport is not good for page speed and for the user experience.

So, It’s better to Stop the native lazy loading of WordPress websites and use a better plugin for that which will allow you to exclude top images. So, let’s check How you can disable the lazy loading of images in WordPress.

There are two methods to achieve this. One is using a custom Code snippet or by using a plugin.

Disable Lazy Load in WordPress Using Code (Without Plugin)

You can disable the native lazy loading of images by adding a custom code snippet to your theme’s
functions.php file.

Disable Lazy Load in WordPress Using Code (Without Plugin)

But, For safety, you can use a code manager plugin like WP code that lets you add different code snippets to your WordPress website.

Disable Lazy Load in WordPress Using Code (Without Plugin)

You can also use any other code manager plugin for that. Just click on the Add snippet option as shown in the below image.

Disable Lazy Load in WordPress Using Code (Without Plugin)

Now Add the below code snippet and switch the code type to PHP snippet, Click on the active button and save the snippet.

add_filter( 'wp_lazy_loading_enabled', '__return_false' );
Disable Lazy Load in WordPress Using Code (Without Plugin)

Now the lazy loading of WordPress will be blocked and images will load immediately on the page.

Disable Lazy Load in WordPress Using a Plugin

If you don’t want to use a custom code snippet then you can install a simple plugin for that. Basically, the plugin contains the same code and makes your process simple. Just install the “ Disable Lazy Load ” plugin by Jeff Starr and activate the plugin.

Disable Lazy Load in WordPress Using a Plugin

Conclusion

Now, the Lazy loading will stop on your WordPress website. Whether you choose method 1 or 2 the same line of code will be added to your WordPress website to block the native lazy loading. If you are already using any code manager plugin then you can go for method 1. If you want a better solution for lazy loading you can Use plugins like Litespeed cache , Perfmatters , Wp-Rocket, etc. I hope this Article helps you disable lazy loading on the WordPress website.

I recommend you to use the search bar to find more tutorials like this. Also you can subscribe to our youtube channel for more tutorials like this.