{"id":746,"date":"2024-05-07T11:42:36","date_gmt":"2024-05-07T11:42:36","guid":{"rendered":"https:\/\/kb.shortpixel.com\/docs\/cloudlfare\/"},"modified":"2025-08-27T08:44:20","modified_gmt":"2025-08-27T08:44:20","password":"","slug":"cloudlfare","status":"publish","type":"docs","link":"https:\/\/kb.shortpixel.com\/knowledge-base\/article\/cloudlfare\/","title":{"rendered":"Possible Cloudflare issues and suggestions on how to address them"},"content":{"rendered":"\n<p>The <a href=\"https:\/\/wordpress.org\/plugins\/shortpixel-image-optimiser\/\" target=\"_blank\" rel=\"noopener\">ShortPixel Image Optimizer<\/a> (SPIO) plugin works well with <a href=\"https:\/\/www.cloudflare.com\/\" target=\"_blank\" rel=\"noopener\">Cloudflare<\/a>. However,&nbsp;if you have problems using them together, please check these suggestions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Firewall rules, Rate limiting, and Security level sections<\/h2>\n\n\n\n<p>Please log in to your Cloudflare account and check the <strong>Firewall rules<\/strong><em>, <\/em><strong>Rate limiting rules<\/strong>\u00a0and <strong>Security Level<\/strong> sections to see if the current settings might prevent our servers from accessing your website.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Custom rules<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"788\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104601-1024x788.jpg\" alt=\"\" class=\"wp-image-1737\" srcset=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104601-1024x788.jpg 1024w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104601-300x231.jpg 300w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104601-768x591.jpg 768w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104601-360x277.jpg 360w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104601.jpg 1321w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Rate limiting rules<\/h3>\n\n\n\n<p>Here is <a href=\"https:\/\/support.cloudflare.com\/hc\/en-us\/articles\/115001635128-Cloudflare-Rate-Limiting\" target=\"_blank\" rel=\"noopener\">Cloudflare&#8217;s\u00a0Rate Limiting documentation<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"741\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104659-1024x741.jpg\" alt=\"\" class=\"wp-image-1738\" srcset=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104659-1024x741.jpg 1024w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104659-300x217.jpg 300w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104659-768x556.jpg 768w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104659-360x260.jpg 360w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104659.jpg 1295w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Security level<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"499\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104742-1024x499.jpg\" alt=\"\" class=\"wp-image-1739\" srcset=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104742-1024x499.jpg 1024w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104742-300x146.jpg 300w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104742-768x374.jpg 768w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104742-1536x749.jpg 1536w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104742-360x175.jpg 360w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/Screenshot-20250226_104742.jpg 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">IP Access Rules<\/h2>\n\n\n\n<p>Make sure you <strong>whitelist our IPs<\/strong> (see <a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/ips-to-be-whitelisted\/\" rel=\"noopener\">here<\/a>) and also <strong>make sure there are no country-specific restrictions for Germany<\/strong> (this is where our servers are located).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><figure><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-cPHRWsUz6g.jpg\"><\/figure>Remove the security captcha<\/h2>\n\n\n\n<p>In some cases, we have found that there is a security captcha that needs to be disabled in your Cloudflare account, otherwise our optimization cloud will not be able to access the images.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-S41hmzxwX5.png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Add your Cloudflare details in SPIO<\/h2>\n\n\n\n<p>Add your Cloudflare details\u00a0in the appropriate tab in the\u00a0ShortPixel plugin settings. Learn more <a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/using-shortpixel-image-optimizer-with-cloudflare-api-token\/\" rel=\"noopener\">here<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-dbbqmjabvV.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Under Attack Mode<\/h2>\n\n\n\n<p>If your website is in Under Attack Mode,&nbsp;our optimization cloud will most likely not be able to access your images to optimize them.<\/p>\n\n\n\n<p>Please make sure to disable this mode before trying image optimization again &#8211; of course, only when you are no longer under attack \ud83d\ude42<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cloudflare and WebP delivery<\/h2>\n\n\n\n<p>Cloudflare may not work well with the WebP\/AVIF delivery method\u00a0&#8220;Without altering the page code (via .htaccess)&#8221;.\u00a0In fact, if you have a free plan with Cloudflare, such solution does not work at all. You can read more about it\u00a0<a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/delivering-webp-images-via-htaccess\/\" rel=\"noopener\">here<\/a>.\u00a0Therefore, if you want to deliver your WebP\/AVIF files with ShortPixel without any problems, we recommend you using an alternative delivery method.\u00a0You can find more information here: <a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/how-to-serve-webp-files-using-spio\/\" rel=\"noopener\">How to serve WebP files using SPIO<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The ShortPixel Image Optimizer (SPIO) plugin works well with Cloudflare. However,&nbsp;if you have problems using them together, please check these suggestions. Firewall rules, Rate limiting, and Security level sections Please log in to your Cloudflare account and check the Firewall rules, Rate limiting rules\u00a0and Security Level sections to see if the current settings might prevent [&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-746","docs","type-docs","status-publish","hentry","doc_category-shortpixel-image-optimizer"],"blocksy_meta":[],"year_month":"2026-04","word_count":298,"total_views":"3758","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\/746","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=746"}],"version-history":[{"count":3,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/746\/revisions"}],"predecessor-version":[{"id":2539,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/746\/revisions\/2539"}],"wp:attachment":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/media?parent=746"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_category?post=746"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/glossaries?post=746"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_tag?post=746"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}