{"id":885,"date":"2024-05-07T11:45:02","date_gmt":"2024-05-07T11:45:02","guid":{"rendered":"https:\/\/kb.shortpixel.com\/docs\/webp-isnt-served-on-amp-websites\/"},"modified":"2025-08-27T08:41:16","modified_gmt":"2025-08-27T08:41:16","password":"","slug":"webp-isnt-served-on-amp-websites","status":"publish","type":"docs","link":"https:\/\/kb.shortpixel.com\/knowledge-base\/article\/webp-isnt-served-on-amp-websites\/","title":{"rendered":"WebP isn&#8217;t served on AMP websites"},"content":{"rendered":"\n<p><strong>AMP doesn&#8217;t support <code>&lt;picture><\/code> tags<\/strong>, so that&#8217;s the reason why ShortPixel Image Optimizer isn&#8217;t able to serve WebP images on AMP websites if you have activated the option\u00a0<em>Using the &lt;PICTURE> tag syntax.<br><\/em><\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20241202_120956-1024x536.jpg\" alt=\"\" class=\"wp-image-1458\" srcset=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20241202_120956-1024x536.jpg 1024w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20241202_120956-300x157.jpg 300w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20241202_120956-768x402.jpg 768w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20241202_120956-1536x804.jpg 1536w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20241202_120956-360x189.jpg 360w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20241202_120956.jpg 1564w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>There is a workaround available published by @westonrouter on Github but is <strong><a href=\"https:\/\/github.com\/ampproject\/amphtml\/issues\/21912#issuecomment-617995565\" target=\"_blank\" rel=\"noopener\">considered anti-pattern<\/a>, so we would not recommend this approach.<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to <a href=\"https:\/\/gist.github.com\/westonruter\/332abdb2adefc6b204ad6fcc1beecedf\" target=\"_blank\" rel=\"noopener\">https:\/\/gist.github.com\/westonruter\/332abdb2adefc6b204ad6fcc1beecedf<\/a><\/li>\n\n\n\n<li>Click on <em>Download ZIP<\/em>.<br><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-DCmJcywoai.jpg\"><\/li>\n\n\n\n<li>Upload it to your WordPress dashboard, on <em>Plugins &gt; Add New &gt; Upload Plugin<\/em>.<\/li>\n\n\n\n<li>Clear your cache: <a href=\"https:\/\/help.shortpixel.com\/article\/426-how-to-clear-wordpress-cache\" rel=\"noopener\"><strong>How to clear WordPress cache<\/strong><\/a><\/li>\n<\/ol>\n\n\n\n<p>We&#8217;re looking into other possible solutions to this issue and we&#8217;ll implement them if we find any.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>AMP doesn&#8217;t support &lt;picture> tags, so that&#8217;s the reason why ShortPixel Image Optimizer isn&#8217;t able to serve WebP images on AMP websites if you have activated the option\u00a0Using the &lt;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. We&#8217;re looking [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[37],"glossaries":[],"doc_tag":[],"class_list":["post-885","docs","type-docs","status-publish","hentry","doc_category-shortpixel-image-optimizer"],"blocksy_meta":[],"year_month":"2026-05","word_count":112,"total_views":"1057","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"admin","author_nicename":"admin_mdli53m5","author_url":"https:\/\/kb.shortpixel.com\/author\/admin_mdli53m5\/"},"doc_category_info":[{"term_name":"ShortPixel Image Optimizer","term_url":"https:\/\/kb.shortpixel.com\/knowledge-base\/category\/shortpixel-image-optimizer\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/comments?post=885"}],"version-history":[{"count":3,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/885\/revisions"}],"predecessor-version":[{"id":2371,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/885\/revisions\/2371"}],"wp:attachment":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/media?parent=885"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_category?post=885"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/glossaries?post=885"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_tag?post=885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}