View Categories

WebP isn’t served on AMP websites

AMP doesn’t support <picture> tags, so that’s the reason why ShortPixel Image Optimizer isn’t able to serve WebP images on AMP websites if you have activated the option Using the <PICTURE> tag syntax.

There is a workaround available published by @westonrouter on Github but is considered anti-pattern, so we would not recommend this approach.

  1. Go to https://gist.github.com/westonruter/332abdb2adefc6b204ad6fcc1beecedf
  2. Click on Download ZIP.
  3. Upload it to your WordPress dashboard, on Plugins > Add New > Upload Plugin.
  4. Clear your cache: How to clear WordPress cache

We’re looking into other possible solutions to this issue and we’ll implement them if we find any.