Bug 231894 - Allow for different lazy loading policies on responsive image sources.
Summary: Allow for different lazy loading policies on responsive image sources.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-18 08:27 PDT by Patrick Meenan
Modified: 2021-10-25 08:28 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Meenan 2021-10-18 08:27:42 PDT
Currently lazy loading is applied to the <img> element, even when there are multiple <source> tags for the same image within a <picture>.

For a responsive site that may have different images in the viewport based on layout (mobile vertical scroll vs desktop grid for example), a developer will need to decide which layout to optimize for and potentially slow down the performance of the other layouts.

A possible solution would be to have a given <source> to have a loading attribute that would override the lazy loading state of the <img> that it is associated with.

This is an extension of the original lazyload support: https://bugs.webkit.org/show_bug.cgi?id=200764

whatwg issue: https://github.com/whatwg/html/issues/7227
Comment 1 Radar WebKit Bug Importer 2021-10-25 08:28:40 PDT
<rdar://problem/84615291>