{"id":713,"date":"2024-05-07T11:42:01","date_gmt":"2024-05-07T11:42:01","guid":{"rendered":"https:\/\/kb.shortpixel.com\/docs\/why-are-my-images-redirected-from-cdn-shortpixel-ai\/"},"modified":"2025-08-27T08:46:18","modified_gmt":"2025-08-27T08:46:18","password":"","slug":"why-are-my-images-redirected-from-cdn-shortpixel-ai","status":"publish","type":"docs","link":"https:\/\/kb.shortpixel.com\/knowledge-base\/article\/why-are-my-images-redirected-from-cdn-shortpixel-ai\/","title":{"rendered":"Why are the images not accessible by ShortPixel AI or Autoptimize?"},"content":{"rendered":"\n<section class=\"callout-blue\">This article refers to both ShortPixel Adaptive Image (SPAI) and Autoptimize (AO).<\/section>\n\n\n\n<p>There are usually\u00a0<strong>7 possible reasons<\/strong> why\u00a0you find that an image isn&#8217;t delivered from the <a href=\"https:\/\/help.shortpixel.com\/article\/62-where-does-the-cdn-has-pops\" target=\"_blank\" rel=\"noopener\">ShortPixel&#8217;s CDN<\/a>,\u00a0but from the original location (after a temporary redirect, <a href=\"https:\/\/en.wikipedia.org\/wiki\/HTTP_302\" target=\"_blank\" rel=\"noopener\">HTTP code 302<\/a> or 307),\u00a0which almost always means that our servers cannot access the images.<\/p>\n\n\n\n<section class=\"callout-yellow\">Please make sure you understand how the plugins work:\n<ul>\n<li><a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/132-how-shortpixel-adaptive-images-work\" rel=\"noopener\">How does ShortPixel Adaptive Images work?<\/a><\/li>\n<li><a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/65-how-does-shortpixel-ai-cdn-work\" rel=\"noopener\">How does Autoptimize and its Image Optimization service work?<\/a><\/li>\n<\/ul>\n<\/section>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The most common reason for this is that when an <strong>image is accessed for the first time <\/strong>(or any new image size), it\u2019s registered for processing by ShortPixel. To ensure the user doesn\u2019t experience any delay, the original image is immediately served via an HTTP 307 redirect. After a few seconds &#8211; or longer in some cases &#8211; the image hosted in the CDN should appear once the page is refreshed. Keep in mind that the time it takes for the image to appear can also depend on your browser\u2019s cache.<\/li>\n\n\n\n<li>In many cases, a <strong>firewall prevents ShortPixel&#8217;s servers<\/strong> from accessing the images on the original website. It can be one of your plugins, your hosting, or your CDN. The solution is to whitelist ShortPixel&#8217;s IPs, as described <a href=\"https:\/\/help.shortpixel.com\/article\/52-ips-to-be-whitelisted\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/li>\n\n\n\n<li>The files aren&#8217;t publicly accessible because they are on a <strong>website hosted on an intranet<\/strong>, the <strong>website is password protected,\u00a0<\/strong>or there are defined rules on your .htaccess file (usually for <strong>anti-hotlinking<\/strong>). The solution is to have the website hosted publicly on the Internet, remove any password protection, and make sure there are no .htaccess rules that may prevent ShortPixel&#8217;s API from accessing the images.<\/li>\n\n\n\n<li><strong style=\"background-color: initial;\">Cloudflare<\/strong> or some other CDN providers may also be the cause; as part of their security measures, they may require human input, and since our servers aren&#8217;t human, they fail this check.\u00a0The solution is to whitelist ShortPixel&#8217;s IPs, as described <a href=\"https:\/\/help.shortpixel.com\/article\/52-ips-to-be-whitelisted\" rel=\"noopener\">here<\/a>.<\/li>\n\n\n\n<li>There is\u00a0<strong>no more CDN traffic quota available\u00a0<\/strong>in the account associated with the website where <a href=\"https:\/\/wordpress.org\/plugins\/shortpixel-adaptive-images\/\" target=\"_blank\" rel=\"noopener\">ShortPixel Adaptive Images<\/a> or Autoptimize is installed. The solution is to <a href=\"https:\/\/shortpixel.com\/pricing\" rel=\"noopener\">purchase more CDN traffic<\/a>.<\/li>\n\n\n\n<li>If there is enough CDN traffic in your account, the domain\/website where you&#8217;re using SPAI or AO is probably\u00a0<strong>not associated with your account<\/strong>. Please <a href=\"https:\/\/help.shortpixel.com\/article\/94-how-to-associate-a-domain-to-my-account\" target=\"_blank\" rel=\"noopener\">associate the domain<\/a> to your account and the images should start being served by ShortPixel&#8217;s CDN shortly.<\/li>\n\n\n\n<li>If you are using <a href=\"https:\/\/help.shortpixel.com\/article\/180-can-i-use-a-different-cdn-with-shortpixel-adaptive-images\" target=\"_blank\" rel=\"noopener\">an external CDN<\/a> and not ShortPixel&#8217;s default one, and you have used up your credit, you may see 302 redirects. <strong>These redirects may be cached by your external CDN<\/strong>. So as soon as you add more credits to your account, you should clear your CDN cache to get rid of these redirects.<\/li>\n<\/ol>\n\n\n\n<p>If none of these reasons apply, we recommend flushing the redirected images from our CDN cache following<a href=\"https:\/\/help.shortpixel.com\/article\/237-how-to-flush-an-image-fromshortpixel-cdn\" target=\"_blank\" rel=\"noopener\"> these instructions<\/a> and trying again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article refers to both ShortPixel Adaptive Image (SPAI) and Autoptimize (AO). There are usually\u00a07 possible reasons why\u00a0you find that an image isn&#8217;t delivered from the ShortPixel&#8217;s CDN,\u00a0but from the original location (after a temporary redirect, HTTP code 302 or 307),\u00a0which almost always means that our servers cannot access the images. Please make sure you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[36,35],"glossaries":[],"doc_tag":[],"class_list":["post-713","docs","type-docs","status-publish","hentry","doc_category-autoptimize","doc_category-shortpixel-adaptive-images"],"blocksy_meta":[],"year_month":"2026-04","word_count":465,"total_views":"1969","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":"Autoptimize","term_url":"https:\/\/kb.shortpixel.com\/knowledge-base\/category\/autoptimize\/"},{"term_name":"ShortPixel Adaptive Images","term_url":"https:\/\/kb.shortpixel.com\/knowledge-base\/category\/shortpixel-adaptive-images\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/713","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=713"}],"version-history":[{"count":1,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/713\/revisions"}],"predecessor-version":[{"id":1877,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/713\/revisions\/1877"}],"wp:attachment":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/media?parent=713"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_category?post=713"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/glossaries?post=713"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_tag?post=713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}