Lazy-load by default on WordPress 5.4
WordPress announced yesterday that the version 5.4 will automatically lazy-load all images by default, this is a new feature that wasn’t present in previous versions of WordPress, where web owners needed to install plugins in order to enable this feature in their websites and provide a faster experience to their users.
The Lazy-Load attribute tells the browser when to download an image, when it’s configured as “lazy” the browser will wait to load the image until it becomes relevant for the viewport, and when its configured as “eager” it will download the image immediately.
The following tags will have the “lazy” attribute by default:
- 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()
WordPress 5.4 is expected to be released on the 31 of March, but that is just a tentative date.