{"id":918,"date":"2024-05-07T11:45:37","date_gmt":"2024-05-07T11:45:37","guid":{"rendered":"https:\/\/kb.shortpixel.com\/docs\/deleting-webp-or-avif-files-created-by-shortpixel\/"},"modified":"2025-08-27T08:40:21","modified_gmt":"2025-08-27T08:40:21","password":"","slug":"deleting-webp-or-avif-files-created-by-shortpixel","status":"publish","type":"docs","link":"https:\/\/kb.shortpixel.com\/knowledge-base\/article\/deleting-webp-or-avif-files-created-by-shortpixel\/","title":{"rendered":"Deleting WebP or AVIF files created by ShortPixel"},"content":{"rendered":"\n<p>If you have created WebP and\/or AVIF files with ShortPixel Image Optimizer (SPIO) and for some reason you want to delete them from your file system, do the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log into your hosting provider&#8217;s control panel and access the file manager. Alternatively, you can also use an FTP client or login via SSH to your server. Please contact your hosting provider if you need help with this step.<\/li>\n\n\n\n<li><p>Navigate to the path where your WebP\/AVIF files are located. This is usually <b>\/wp-content\/uploads\/YYYY\/MM<\/b>, where <code>YYYY<\/code> is the year and <code>MM<\/code> is the month in which the upload occurred.<\/p><img decoding=\"async\" style=\"width: 100%; max-width: 100%;\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-bsylOarmN0.jpg\"><\/li>\n\n\n\n<li>Delete any WebP\/AVIF files you wanted to delete. If you are logged in via SSH, you just need to run this command inside the folder you want: <code>find . -name \"*.webp\" -type f -delete<\/code><\/li>\n\n\n\n<li>Go to <b>\/wp-content\/themes\/your_theme<\/b> (where <code>your_theme<\/code> is the folder of the theme you are using) and edit the <b>functions.php<\/b> file.<\/li>\n\n\n\n<li><p>Add the following line: <code>add_filter('shortpixel\/image\/filecheck', function () { return true; });<\/code><\/p><img decoding=\"async\" style=\"width: 100%; max-width: 100%;\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-NKwDB8JOdY.jpg\"><\/li>\n\n\n\n<li>Save the file.<\/li>\n\n\n\n<li>Go to your WordPress dashboard, and then to <b>Settings > ShortPixel > Tools<\/b>.<\/li>\n\n\n\n<li>Click on the &#8220;<b>Search and Migrate All<\/b>&#8221; button. The purpose of this step is to remove the information that SPIO stores about the WebP\/AVIF files from the database so that new information can be created and the database remains in a consistent state.<\/li>\n\n\n\n<li>Follow the instructions until the process is complete.<\/li>\n\n\n\n<li>Go back to edit the <b>functions.php<\/b> file and remove the line you added in step #5. Save the file.<\/li>\n<\/ol>\n\n\n\n<p>That&#8217;s it!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have created WebP and\/or AVIF files with ShortPixel Image Optimizer (SPIO) and for some reason you want to delete them from your file system, do the following: That&#8217;s it!<\/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-918","docs","type-docs","status-publish","hentry","doc_category-shortpixel-image-optimizer"],"blocksy_meta":[],"year_month":"2026-05","word_count":259,"total_views":"1113","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\/918","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=918"}],"version-history":[{"count":2,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/918\/revisions"}],"predecessor-version":[{"id":2334,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/918\/revisions\/2334"}],"wp:attachment":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/media?parent=918"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_category?post=918"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/glossaries?post=918"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_tag?post=918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}