Skip to content

Add image lazy loading #27032

Closed
Closed
@tdgroot

Description

@tdgroot

Description (*)

In many situations, catalog lists can contain many images, while most of them remain under the first fold.

When running an audit using Lighthouse, it tells us the following.
image

So we need to add the loading="lazy" attribute to the images on the catalog list. This attribute is supported on the following browsers (source):

In Chromium's aforementioned blog post, it seems that lazy loading is enabled for all websites on Chrome Android browsers with Lite Mode enabled.

Expected behavior (*)

Better performance for catalog pages. This is achieved by adding the loading="lazy" attribute to the image_with_borders.phtml template.

Benefits

Better performance for both users and Lighthouse reports.

Additional information

Not for now

Metadata

Metadata

Assignees

Labels

Fixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: Format is validGate 1 Passed. Automatic verification of issue format passedfeature request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions