Skip to content

Lazy Images: Update to not require jQuery #14863

@josephscott

Description

@josephscott

When you enable the Lazy Images feature in Jetpack, it also brings in jQuery.

Describe the solution you'd like

An updated version of the Lazy Images JavaScript code that does not require jQuery - a.k.a. vanilla JavaScript.

Additional context

I recently ran tests under slow mobile conditions and just enabling the Lazy Images feature in Jetpack increased the start render times by 21%. A big part of that is the 335% increase in JavaScript being loaded on the page. Of that a big chunk comes from jQuery, at 94 KB.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions