WP Manifestindependent plugin directory
manifest / media / amp-picture

AMP Picture Compat

Add Temporary support for <picture> element.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/milindmore22/amp-picture/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

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.