Skip to content

Add Native Lazy Loading Support and Whitelist attribute loading #21982

@ghost

Description

Google Chrome is officially launching Native Lazy Loading in Chrome 75+ and they have created a new attribute called loading.

Example of the Google Spec will be like this:

<!-- Lazy-load an offscreen image when the user scrolls near it -->
<amp-img src="/static/samples/img/amp.jpg"
  width="1080"
  height="610"
  layout="responsive"
  alt="AMP"
  loading="lazy"></amp-img>

<!-- Load an image right away instead of lazy-loading -->
<amp-img src="/static/samples/img/amp.jpg"
  width="1080"
  height="610"
  layout="responsive"
  alt="AMP"
  loading="eager"></amp-img>

<!-- Browser decides whether or not to lazy-load the image -->
<amp-img src="/static/samples/img/amp.jpg"
  width="1080"
  height="610"
  layout="responsive"
  alt="AMP"
  loading="auto"></amp-img>

Please can you add the attribute to the whitelist and add it to the AMP Core.

Thanks.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions