fbpx

Get the Official WPSaviour App Now!

Best WordPress PluginsBlog

WordPress 5.4 Will Add Lazy-Loading to All Images

Wordpress 5.4| Wp Saviour

WordPress announced that WordPress 5.4 may feature image lazy-loading by default. This feature will enable the “loading” HTML attribute on all IMG elements . WordPress  publishers will no longer need to use JavaScript or third party plugins to load their images.

Lazy-loading

The lazy-loading HTML attribute tells a browser to either wait before downloading an image or to download it right away. There is no JavaScript need to accomplish this.

There are three kinds of lazy-loading attributes but only two that really matter:

Lazy
Eager

Lazy, which will be enabled by default in WordPress 5.4, means waiting for users to view the browser within certain distance before downloading the image. This behavior will speed up a users experience on WordPress sites.

The “eager” attribute tells the browser to immediately download the image.
WordPress 5.4 Release Date

WordPress 5.4 currently set to release on March 31, 2020. That date is subject to change depending on how ready the release is. But WordPress has been very good about meeting their deadlines.

According to the WordPress announcement:

“The implementation seeks to enable lazy-loading images by default, providing the loading attribute with value lazy on the following img tags:

post content images
post excerpts images
comments images
text widget content images
Individual images rendered via wp_get_attachment_image()
Avatar images rendered via get_avatar()

Note that loading=”lazy” will only be added if the respective tag does not yet include a loading attribute. it is recommended to specify loading=”eager” to prevent an image from being lazy-loaded.

According to the WordPress comments, the lazy-loading attributes will be implemented in a manner that makes it easy to remove them. This is important in case future browsers begin lazy-loading all images by default, without the need for a loading attribute.

Google has indicated via Web.dev that there are plans to automatically enable lazy-loading to all images when a browser in the Lite mode (formerly known as Data Saver mode).

Test Drive WordPress Lazy-Loading

The WordPress team has officially released a WordPress lazy-loading plugin designed for testing purposes. Publishers who want to test it and give feedback are welcome to download the plugin and give it a try.

See other Blogs

Download The WPSaviour App Now

Related posts
Beginner’s GuideBlog

How to Add a Preloader Animation to WordPress (Step by Step)

BlogTutorials

Install WordPress On Ubuntu Locally With LAMP

BlogTutorials

Theme Customizer Boilerplate – Conditional Options, Child Themes and Plugins

BlogTutorials

WooCommerce Recently Viewed Products Shortcode Plugin

Sign up for our Newsletter and
stay informed