Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renderer: Use native <img> instead of <amp-img #10213

Closed
swissspidy opened this issue Jan 17, 2022 · 0 comments · Fixed by #10219
Closed

Renderer: Use native <img> instead of <amp-img #10213

swissspidy opened this issue Jan 17, 2022 · 0 comments · Fixed by #10219
Labels
Group: Blocks Issues related to the provided Gutenberg Blocks Group: Widgets Issues related to the provided WordPress widgets Group: WordPress Changes related to WordPress or Gutenberg integration Type: Enhancement New feature or improvement of an existing feature

Comments

@swissspidy
Copy link
Collaborator

Feature Description

With amp-img being deprecated in favor of native img (ampproject/amphtml#30442), we can now finally stop using amp-img by default.

The AMP plugin v2.3 (coming out soon) will make the switch as well. See ampproject/amp-wp#6805

We're currently using amp-img here:

https://github.com/google/web-stories-wp/blob/e7cb5fe4dee961dbfc318dbc7b3c75b3373b6a02/includes/Renderer/Stories/Renderer.php#L594-L613

We should:

  1. Remove that condition and use img only
  2. Use loading="lazy" and decoding="async" for img
  3. update any CSS targeting amp-img
  4. Verify that there are no regressions when viewing the AMP version of a post

Alternatives Considered

Additional Context

Note: This does not apply to stories, i.e. <amp-story> remains unaffected.

@swissspidy swissspidy added Type: Enhancement New feature or improvement of an existing feature Group: WordPress Changes related to WordPress or Gutenberg integration Pod: WP & Infra Group: Blocks Issues related to the provided Gutenberg Blocks Group: Widgets Issues related to the provided WordPress widgets labels Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Group: Blocks Issues related to the provided Gutenberg Blocks Group: Widgets Issues related to the provided WordPress widgets Group: WordPress Changes related to WordPress or Gutenberg integration Type: Enhancement New feature or improvement of an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant