Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Properly Disable Lazy Load in WordPress (Step by Step)

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Do you want to disable lazy load in WordPress?

By default, WordPress comes with a lazy load feature, which delays downloads for images and other media to improve page load speed. However, this may affect the user experience for some websites by not displaying images right away.

In this article, we will show you how to easily disable lazy loading in WordPress.

How to properly disable lazy load in WordPress

What Is Lazy Loading?

WordPress first introduced lazy loading images in WordPress 5.5. Later it extended the lazy load feature to iframes embeds (like YouTube videos, Spotify, and other embeds).

This practice helps improve your site’s performance and page speed by quickly loading content and the visible area first.

A faster website is not just good for users, but it can also improve your website rankings because search engines like Google consider speed an important ranking factor.

Apart from images and embeds, you can also easily lazy load comments and Gravatars to further improve page load speed.

The lazy loading functionality can be seen in action by right-clicking on an image and selecting the Inspect tool in your browser.

Lazy loading images in WordPress

This will split your browser screen and show you the HTML source code. From here, you’ll be able to see the “loading=lazy” attribute added to the image.

Now normally, we don’t recommend disabling lazy load due to its overall benefits for your WordPress website. Turning it off can result in slower website speed, lower conversion rates, and lower SEO rankings.

However, sometimes lazy loading can affect the user experience for some websites.

For instance, if you run a photography website where images are the most significant aspect of your content, then lazy loading them may ruin the user experience for your customers.

In other cases, you might be using a different lazy loading solution and just want to turn off the default WordPress lazy load.

That being said, let’s see how you can easily disable lazy load in WordPress.

For this tutorial, we will you a code method and a plugin method, so you can use the links below to jump to the method of your choice:

Video Tutorial

Subscribe to WPBeginner

If you’d prefer written instructions, then just keep reading.

You can simply disable the lazy load feature in WordPress by adding custom code to your theme’s functions.php file.

However, keep in mind that the smallest error while adding the code can break your website and make it inaccessible.

This is why we recommend using WPCode to add custom code.

It is the best WordPress custom code snippets plugin on the market that makes it super easy and safe to add code to your website.

First, you need to install and activate the WPCode plugin. For detailed instructions, see our guide on how to install a WordPress plugin.

Note: WPCode also has a free version that you can use for this tutorial. However, upgrading to the paid plan will give you access to features like code snippets library, CSS code type, conditional logic, and more.

Upon activation, visit the Code Snippets » + Add Snippet page from the WordPress dashboard.

From here, click the ‘Use Snippet’ button under the ‘Add Your Custom Code (New Snippet)’ option.

Add new snippet

This will direct you to the ‘Create Custom Snippet’ page, where you can start by typing a name for your code snippet. This can be anything that will help you identify the code snippet and what it does.

After that, select ‘PHP Snippet’ from the ‘Code Type’ dropdown menu in the right corner of the screen.

Choose PHP code type for the code snippet to disable lazy loading

Now, copy and paste the following PHP code in the ‘Code Preview’ box:

add_filter( 'wp_lazy_loading_enabled', '__return_false' );

This is how the code will look after being pasted.

Add code snippet

After that, scroll down to the ‘Insertion’ section. Here, simply choose ‘Auto Insert’ mode.

This will ensure that your custom code is automatically executed everywhere on your WordPress site once you activate the snippet.

Choose an insertion method

Next, scroll back to the top of the page and simply toggle the ‘Inactive’ switch to ‘Active’.

After that, don’t forget to click the ‘Save Snippet’ button to save and execute your code snippet.

Save your code snippet

Once activated, this custom code snippet will disable the lazy loading feature on your WordPress blog.

You can test that by right-clicking on an image and selecting ‘Inspect’ from the browser menu.

Lazy loading disabled

In the HTML code for the image, the loading=lazy attribute will now disappear.

Method 2: Disable Lazy Load in WordPress Using a Plugin

If you don’t want to add code to your site, then you can use a plugin to disable lazy loading of images.

The only thing you need to do is install and activate the Disable Lazy Load plugin. For more instructions, check our step-by-step guide on how to install a WordPress plugin.

Activate plugin to disable lazy load

The plugin works out of the box and does not require any configuration. Once activated, it will automatically disable the lazy load feature on your website.

Bonus: Boost Your Site’s Speed And Performance

Once you have disabled lazy loading, it can affect your website’s speed and performance negatively.

In that case, you can try other tips to boost your site’s performance and decrease page load time. For example, you can optimize the images on your site by compressing them, using JPEG or PNG as file formats, and adding alt text.

Additionally, you should always use the latest version of WordPress, use excerpts on the homepage, split comments into pages, and use SEO optimized themes on your website.

The WordPress.org theme directory

Other than that, you can also use caching plugins like WP Rocket or WP Super Cache to further boost your site speed.

For more tips, you can see our beginner’s guide to boost WordPress speed and performance.

We hope this article helped you learn how to properly disable lazy load in WordPress. You may also want to see our beginner’s guide on how to optimize WordPress images for better page load times or see our pick of the best WordPress image compression plugins.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

5 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Dimitrios Charalampidis says

    This website’s articles have helped me so much… I just wanted to say: Thank you!

  3. Adrian says

    What about disable lazy load ONLY on featured image (first image above the fold)? Is there an easy way?

    • WPBeginner Support says

      We do not have a recommendation for conditionally disabling it but should that change we will be sure to share!

      Admin

Leave a Reply to WPBeginner Support Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.