WordPress 5.4 May Feature Image Lazy-Loading by Default
WordPress 5.4 will introduce lazy-loading functionality by default, marking a significant advancement in page load optimisation. The concept of lazy loading allows a webpage to render without loading certain resources until they are needed. Consequently, this leads to faster page loads and saves data on the visitor's end.
Image lazy loading is particularly useful when rendering images on the web. Moreover, lazy-loading tells the browser when to load an image using specific attributes. There are two attributes in lazy-loading: "lazy" and "eager". The lazy attribute waits for the user to scroll near the viewport before loading the image. This means that when the user approaches the image location, it loads automatically.
Native Lazy Loading Implementation
For many years, various JavaScript libraries have handled this feature, but not always successfully. However, a native solution is slowly making its way into browsers. Native lazy loading works by adding a loading attribute to an <img> or <iframe> element. Therefore, browsers can decide how to load a resource based on the attribute's value.
Currently, Chrome, Edge, Firefox and Opera all handle the loading attribute. Furthermore, once the attribute officially makes it into the HTML specification, the feature should become a standard that all browsers support.
How This Lazy-Loading Affects Existing Plugins
Because not all web browsers support the loading attribute, users may not want to automatically drop their current plugins when the feature lands in WordPress. Additionally, users may choose to support browsers without native lazy loading for a while.
The proposed code within the lazy loading plugin attempts to detect whether the attribute exists on an image before applying it. As a result, the code should play nicely with existing plugins and avoid conflicts in most cases.
WordPress 5.4 Features Release Timeline
Currently, there are three planned major releases for WordPress in 2020:
Version 5.4 – March 2020
Version 5.5 – August 2020
Version 5.6 – December 2020
Each of those dates are subject to change. Moreover, we should get more specific dates as each release draws near. The various projects for 2020 should land in each release.
WordPress 5.4 was initially set to release on March 31, 2020. However, that date was subject to change depending on how ready the release was. Nevertheless, WordPress has been very good about meeting their deadlines.
