WordPress Snippets

How to Disable Lazy Load in WordPress

By ThemesDNA1 min read

Share:

The lazy-loading images feature was introduced with WordPress 5.5. With this change, both servers and user agents will use a lot less bandwidth. Before, images further down the page would load right away, even if the user never scrolled to see them. But this might make some websites less user-friendly because images might not show up right away.

Do you also have issues with the lazy load feature in WordPress and need to disable it? You can insert the below code into your theme's functions.php file to prevent WordPress from adding the lazy-load attribute to all images and iframes.

// Disable Lazy Load Feature from WordPress
add_filter( 'wp_lazy_loading_enabled', '__return_false', 1000 );
Premium WordPress themes Made for WordPress   /   Ready for your story

Ready to Build?

Your next great website starts here.

Build more websites with one flexible collection—and keep every theme for life.

  • 56+ themes
  • Lifetime updates
  • Unlimited websites
  • No renewals

The complete collection

$75

One payment. No renewals.

Get the Themes Bundle — $75Purchase terms