{"id":905,"date":"2024-05-07T11:45:24","date_gmt":"2024-05-07T11:45:24","guid":{"rendered":"https:\/\/kb.shortpixel.com\/docs\/exclude-some-site-parts-from-webp-picture-tag-replacement\/"},"modified":"2025-08-27T08:40:40","modified_gmt":"2025-08-27T08:40:40","password":"","slug":"exclude-some-site-parts-from-webp-picture-tag-replacement","status":"publish","type":"docs","link":"https:\/\/kb.shortpixel.com\/knowledge-base\/article\/exclude-some-site-parts-from-webp-picture-tag-replacement\/","title":{"rendered":"WebP and AVIF &#8211; Exclude some site parts from the picture tag replacement"},"content":{"rendered":"\n<p>If you are <a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/which-webp-files-delivery-method-is-the-best-for-me\/\" rel=\"noopener\">delivering WebP or AVIF files using ShortPixel<\/a> using the <strong>&lt;PICTURE&gt; tag syntax<\/strong> method, you will notice that there is no setting to exclude images from having their tags replaced, which would be useful if you&#8217;d like to serve a specific file in its original format.<\/p>\n\n\n\n<p>However, there are some workarounds for that:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>If the images that&nbsp;appear in a section of the site (WooCommerce galleries for example) have a particular name convention (let&#8217;s say they all start with <code class=\"inline-code\">myWoo_<\/code> ), you could use the&nbsp;<a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/how-to-exclude-images-from-being-optimized\/\" rel=\"noopener\"><strong>Exclude patterns<\/strong><\/a> setting located on <strong>Settings &gt; ShortPixel &gt; Exclusions<\/strong> (you need to have the <strong>Advanced Mode<\/strong> enabled to be able to access this menu).<em> <\/em>Following the previous example, you would have to input <code class=\"inline-code\">myWoo_<\/code> into that settings field. The downside is that these excluded images won&#8217;t be optimized at all.<br><img decoding=\"async\" width=\"400\" height=\"244\" class=\"wp-image-1434\" style=\"width: 400px;\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20241202_111302.jpg\" alt=\"\" srcset=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20241202_111302.jpg 630w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20241202_111302-300x183.jpg 300w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20241202_111302-360x220.jpg 360w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/li>\n\n\n\n<li><strong>Turn off<\/strong> temporarily the WebP\/AVIF setting (Settings &gt; ShortPixel &gt; WebP\/AVIF &amp; CDN &gt; Create WebP\/AVIF Images) and optimize only the specific images you <strong>don&#8217;t <\/strong>want in WebP\/AVIF format. This will deactivate the generation of WebP\/AVIF and will make the plugin not serve the WebP\/AVIF images. Bear in mind that if you already optimized those images with the WebP\/AVIF setting on, you should first restore them and then reoptimize them with the WebP\/AVIF setting off.<\/li>\n\n\n\n<li>A third option, particularly useful if you don\u2019t want to spend credits re-optimizing your images with the WebP setting disabled, is to <strong>delete the .webp counterparts of the images from your server<\/strong> using an FTP client or a file manager. This way, ShortPixel will detect that the .webp files are missing and will serve the JPG\/PNG versions instead. Keep in mind that this approach will leave the database in an outdated state because the plugin will still assume it created the WebP files (<a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/how-to-check-if-spio-optimized-the-images\/\" rel=\"noopener\">you will see it on the Media Library<\/a>).<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>If you are delivering WebP or AVIF files using ShortPixel using the &lt;PICTURE&gt; tag syntax method, you will notice that there is no setting to exclude images from having their tags replaced, which would be useful if you&#8217;d like to serve a specific file in its original format. However, there are some workarounds for that:<\/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-905","docs","type-docs","status-publish","hentry","doc_category-shortpixel-image-optimizer"],"blocksy_meta":[],"year_month":"2026-05","word_count":317,"total_views":"2362","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\/905","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=905"}],"version-history":[{"count":3,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/905\/revisions"}],"predecessor-version":[{"id":1544,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/905\/revisions\/1544"}],"wp:attachment":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/media?parent=905"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_category?post=905"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/glossaries?post=905"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_tag?post=905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}