The "Using the <PICTURE> tag syntax" option doesn't work; WebP images won't show up
The option "Using the <PICTURE> tag syntax" replaces the <img> HTML tags with <picture> tags so ShortPixel can deliver WebP files correctly. We are talking about one of the two options you can use to deliver WebP images on your site. It is located on Settings > ShortPixel > Advanced > WebP Images:
There could be a few possible explanations why this feature doesn't work:
- The WebP version of the original image was not created when running ShortPixel Image Optimizer. Please check this article: I optimized already all the images but then I realized that I didn't select the option to generate WebP, what can I do?
- A cache solution is serving old pages. It can be your browser's cache, your hosting's cache, your CDN's cache or a cache plugin for your site. Try clearing all of them: How to clear WordPress cache
- You used a page builder for page creation. Our feature may not work well with pages created with some of these tools.
- The images are background images: if your images are loaded via CSS with the property "background-image", ShortPixel will not be able to replace them.
- You've got a Windows Plesk server. You will have to add a MIME type on your server for .webp extensions ==> image/webp .webp
If none of these is true for your case, then you should try an alternative solution for serving WebP images like:
- replacing ShortPixel Image Optimizer with ShortPixel Adaptive Images
- using the second WebP delivery option: Without altering the page code (via .htaccess)
- if you have an NGINX server, you can serve your WebP files in a different way
- using another plugin to deliver the WebP files created by ShortPixel, like Cache Enabler