WP Manifestindependent plugin directory
manifest / media / amp-picture

AMP Picture Compat

Add Temporary support for <picture> element.

by milindmore22, Google · github.com/milindmore22/amp-picture · website

★ 0stars
1forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/milindmore22/amp-picture/archive/refs/heads/main.zip

AMP Picture compatibility

The Mini Plugin to add support for <picture> element

Notes

  • It will convert element into amp-img
  • Just Like img tag it will determine image dimensions automatically.
  • You can remove plugin once the #6676 issue is fixed and released.

Plugin Structure

.
├── sanitizers
│   ├── class-sanitizer.php
└── amp-skeleton-compat.php

Sanitizers

The plugin uses amp_content_sanitizers filter to add custom sanitizers and convert <picture> element to <amp-img>.

Need a feature in plugin?

Feel free to create a issue and will add more examples.