Problem/Motivation
Drupal core added the loading="lazy" attribute to images by default as of 9.1.0. The attribute is persisted in the AMP output and is not valid AMP.
This is also causing the test suite to fail against Drupal 9.2.x.
Steps to reproduce
- Setup a content type and display mode for AMP with an image field using AMP Image Formatter.
- View the post in AMP.
- View source.
Expected result
Image is rendered as valid <amp-img> tag.
Actual result
Image is rendered with an invalid loading="lazy"
The test suite is also catching these failures.
Proposed resolution
Flag the loading attribute as disabled in the relevant AMP field formatters.
Remaining tasks
Merge request it up.
User interface changes
None.
API changes
None.
Data model changes
None.
Comments
Comment #2
m4oliveiComment #6
m4oliveiYay! Green!
Comment #8
m4oliveiComment #10
nelo_drup commentedHow is the status of the patch?