{"id":842,"date":"2024-05-07T11:44:17","date_gmt":"2024-05-07T11:44:17","guid":{"rendered":"https:\/\/kb.shortpixel.com\/docs\/how-to-optimize-images-in-wordpress-themes-and-plugins\/"},"modified":"2025-08-27T08:41:59","modified_gmt":"2025-08-27T08:41:59","password":"","slug":"how-to-optimize-images-in-wordpress-themes-and-plugins","status":"publish","type":"docs","link":"https:\/\/kb.shortpixel.com\/knowledge-base\/article\/how-to-optimize-images-in-wordpress-themes-and-plugins\/","title":{"rendered":"How to optimize images of WordPress themes and plugins"},"content":{"rendered":"\n<p>Some themes and plugins come with some images that you might also want to optimize. These images are almost always not visible via your Media Library, but they may still be used on your pages. If you identify them, you can also optimize them!<\/p>\n\n\n\n<p>Just go to <em>Settings <\/em>> <em>ShortPixel<\/em> > <em>Processing<\/em> (you need to have the Advanced Mode enabled first), and enable the <strong>Custom Media folders<\/strong> option.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"155\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250102_103240-1024x155.jpg\" alt=\"\" class=\"wp-image-1555\" srcset=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250102_103240-1024x155.jpg 1024w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250102_103240-300x46.jpg 300w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250102_103240-768x117.jpg 768w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250102_103240-360x55.jpg 360w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250102_103240.jpg 1159w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then, you can find the Custom Media section on the sidebar, under the Media menu:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-ewTwkzdTSq.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>There, go to the <i>Folders<\/i> tab, click on the &#8220;<strong>Select<\/strong>&#8221; button and select the folder where the images you&#8217;d like to optimize are located (you should probably consult with your theme\/plugin developer what&#8217;s the exact path).\u00a0Once you add the folder(s), you can bulk optimize the images via <em>Media <\/em>> <em>Bulk ShortPixel<\/em>, or manually on the <i>Files<\/i> tab inside the <em>Custom Media <\/em>section<em>.<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-g6c9VfTyHZ.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Please notice that if you are not able to add a folder, it&#8217;s probably because it doesn&#8217;t have the <a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/why-the-plugin-cannot-overwrite-a-file-what-are-the-necessary-permissions\/\" rel=\"noopener\">correct permissions<\/a>.<\/p>\n\n\n\n<p>Custom media folders are scanned automatically every 6 hours to minimize resource usage on your server. If new content is added to these folders, the images will be detected by our plugin within 6 hours.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some themes and plugins come with some images that you might also want to optimize. These images are almost always not visible via your Media Library, but they may still be used on your pages. If you identify them, you can also optimize them! Just go to Settings > ShortPixel > Processing (you need to [&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-842","docs","type-docs","status-publish","hentry","doc_category-shortpixel-image-optimizer"],"blocksy_meta":[],"year_month":"2026-04","word_count":199,"total_views":"2511","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\/842","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=842"}],"version-history":[{"count":3,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/842\/revisions"}],"predecessor-version":[{"id":2410,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/842\/revisions\/2410"}],"wp:attachment":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/media?parent=842"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_category?post=842"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/glossaries?post=842"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_tag?post=842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}