How to Disable Lazy Load in WordPress (Without Plugin)

Updated: September 27, 2022

WordPress 5.5 — which was released on August 11, 2020, with the codename Eckstine — added some new default features. One of which is Lazy Load. Lazy Load itself is a term that refers to a behavior where images on a certain page will only be loaded on the visible section of the page. The purpose is to make a page is faster to be loaded by a web browser. It is one of the most common practices of SEO and site performance optimization.

In WordPress, all images will have an loading="lazy" attribute by default until you disable the Lazy Load feature on the WordPress core. You can read this article to learn more about Lazy Load in WordPress 5.5

The question is, why do you want to disable WordPress default Lazy Load?

The Lazy Load feature is added to help you to better optimize your site performance. The problem is, this technique has been implemented by optimization plugins such as SG Optimizer and Smush. Enabling the Lazy Load feature on your optimization plugin while the WordPress 5.5 default Lazy Load is on might lead to a conflict. Besides, not all WordPress users are into the concept of Lazy Load. Some want all images to be loaded without delay, regardless of the site’s performance.

How to disable Lazy Load in WordPress without a plugin

You can disable the Lazy Load feature in WordPress 5.5 by adding a new function to your theme. Login to your WordPress dashboard and go to Appearance -> Theme Editor. Select the functions.php file on the right sidebar to edit it.

Add the following script to add a new function to your theme. If this is the first time you do this (adding a new function), you can place the script below in the bottom section of the file.

add_filter( 'wp_lazy_loading_enabled', '__return_false' );

Here is an example of the script placement. Click the Update File button to update the file.

This page may contain affiliate links, which help support WP Pagebuilders. Learn more

7 thoughts on “How to Disable Lazy Load in WordPress (Without Plugin)”

    • Hi David,

      Maybe you have another lazy load feature enabled?
      Site optimizer plugins like Site Ground Optimizer or LiteSpeed Cache plugin have their own Lazy Load feature, if enabled, they will disable the WordPress core Lazy Load feature and make the code invalid.

      Reply
  1. Hi Muhammad Rio!
    GTMetrix, on my site says:
    “Don’t lazy load Largest Contentful Paint image”.

    How can I disable lazy-load on specific images (not all)?

    Reply

Leave a Comment

Pin It on Pinterest

Thanks for commenting

Help us grow by sharing this post with your friends!

Join 500+ WordPress users receiving tips and insights on creating with WordPress in the no-code era.

Hello.

How long have you been using WordPress? If you are an old WordPress user, then you have been a witness how WordPress has evolved massively. It has gone from a merely blogging tool into a comprehensive website builder. You can now use WordPress to create any type of website. From e-commerce website, LMS, listing website, membership website, to social media website.

Do you know what’s more interesting?

You can create your website with WordPress without touching a single line of code. At WP Pagebuilders, we write a lot about how to get the most out of WordPress in the no-code era. Subscribe and be first to know our newest content.