Remove Automatic Lazy Loading In Wordpres

Remove Automatic Lazy Loading In Wordpres

From version 5.5, WordPress will integrate automatic support for lazy loading of images. This means that WordPress will add a loading = “lazy” attribute to your images. Even if you don’t want to. Here I’ll show you how to disable lazy loading in WordPress.

Why lazy loading was built into WordPress 5.5

The manufacturer of WP is more and more about making life easier for the user and also making the delivery of websites faster. Images have always been a major burden for website loading times. Many people, therefore, use plugins to add lazy loading to optimize loading times.

That is now a thing of the past if you at least look at the browsers that support this attribute. These are not all and also not across devices. But one can assume that in 1 or 2 years, all modern browsers will catch up.

What happens with lazy loading?

Lazy loading means that images are only loaded when they are supposed to be displayed. This, of course, saves a lot of loading times the first time a site is called up if all images outside of the viewport are not loaded yet, but only later.

However, not everyone likes this function because it is not perfectly controllable and pictures are only loaded when the picture has been scrolled far enough. So it can happen that you see an empty field for a while, which is only filled when you scroll further. This is a horror for design enthusiasts. A real pleasure for performance gurus. Which group do you belong to?

loading = Deactivate “lazy“ in WordPress

So how can you disable the lazy loading attribute in WordPress? With the help of a small plugin:

It’s a super simple plugin that uses the official WordPress tech to disable the WP lazy loading feature. Just install, and you’re done; WordPress will no longer add loading = “lazy” attributes to the images on your website.

Should I have lazy loading inserted via WordPress or plugins?

There are plugins, such as WP Rocket, which in turn add lazy loading to your site. So that there are no conflicts, it might make sense either to deactivate the function in the plugin or to prevent the automatic assignment of attributes by WordPress using the plugin presented. In this case, it is up to you and depends on the setting of your site.

loading = deactivate “lazy “without plugin

You can also save yourself a plugin by deactivating the loading = “lazy” attribute using the following filter in functions.php. So if you are familiar with WP, you can control the whole thing without a plugin.

add_filter (‘wp_lazy_loading_enabled’, ‘__return_false’);