wordpress_5.4

WordPress 5.4 Adds Lazy-Loading to All Images

By default WordPress announced that WordPress 5.4 will feature lazy-loading images. It feature would allow all IMG elements to have the HTML attribute “loading.” WordPress publishers will no longer need to use JavaScript or plug-ins from third parties to lazy-loading their photos.

Lazy-loading

The lazy-loading HTML attribute tells a browser either to wait until an image is downloaded, or to download it quickly. There is no need for JavaScript to do this.

There are three types of lazy-loading attributes but only two really important:

  1. Lazy
  2. Eager

Lazy, which will be enabled by default in WordPress 5.4, means waiting until the viewport of the users browser is within a certain distance before the image is downloaded. This behavior is going to accelerate a user experience on WordPress websites.

The “eager” attribute tells the user to open the image straight away.

Release Date of WordPress 5.4

WordPress 5.4 is officially scheduled for release on 31 March 2020. The date may be changed depending on how ready the release is. But WordPress was very good complying with their deadlines.

WordPress announcement says:

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

Images in post content Images in post excerpts Images in comments Images in text widget content 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. In other words, to prevent an image from being lazy-loaded, it is recommended to specify loading=”eager”.”

The lazy-loading attributes will be applied in a way that makes it easy to remove them, according to the WordPress comments. This is important in case future browsers start to lazy-load all images by default, without a loading attribute being required.

Google has indicated via Web.dev that when a browser is in Lite mode (formerly known as Data Saver mode), it aims to automatically allow lazy-loading to all images.

Lazy-loading WordPress test drive

The WordPress team officially released a lazy-loading plugin for testing purposes built for WordPress. Publishers wishing to test it and provide feedback are welcome to download the plugin and try it out.

Read the official statement here on WordPress:

Lazy-Loading Images in WordPress Core

More Stories
digital_roadmap
What’s a Customer Journey and why does it matter to SEO?
subscribe_image_1

stay informed!

Subscribe to receive exclusive content and notifications

cookies

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.