{"id":697,"date":"2024-05-07T11:41:44","date_gmt":"2024-05-07T11:41:44","guid":{"rendered":"https:\/\/kb.shortpixel.com\/docs\/how-does-shortpixel-ai-cdn-work\/"},"modified":"2025-08-27T08:46:52","modified_gmt":"2025-08-27T08:46:52","password":"","slug":"how-does-shortpixel-ai-cdn-work","status":"publish","type":"docs","link":"https:\/\/kb.shortpixel.com\/knowledge-base\/article\/how-does-shortpixel-ai-cdn-work\/","title":{"rendered":"How does Autoptimize and its Image Optimization service work?"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1929\" height=\"957\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/autoptimize-image-optimization-and-cdn.png\" alt=\"\" class=\"wp-image-2096\" srcset=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/autoptimize-image-optimization-and-cdn.png 1929w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/autoptimize-image-optimization-and-cdn-300x149.png 300w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/autoptimize-image-optimization-and-cdn-1024x508.png 1024w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/autoptimize-image-optimization-and-cdn-768x381.png 768w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/autoptimize-image-optimization-and-cdn-1536x762.png 1536w, https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2024\/05\/autoptimize-image-optimization-and-cdn-360x179.png 360w\" sizes=\"(max-width: 1929px) 100vw, 1929px\" \/><\/figure>\n\n\n\n<p>When you enable <strong>Image optimization &amp; CDN<\/strong> (Settings &gt; Autoptimize &gt; Images), Autoptimize scans your page\u2019s code and replaces every unoptimized image with its optimized version, delivered through the ShortPixel CDN.<\/p>\n\n\n\n<p><strong>Note:<\/strong> Autoptimize will not alter your original files or their metadata on your server. Instead, it optimizes images <strong>on-the-fly<\/strong>, triggered whenever a visitor loads one of your pages. If you want to revert to the original images, simply disable the <strong>Image optimization &amp; CDN<\/strong> option. The process is fully transparent to all users:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>A user visits a page containing images.<\/li>\n\n\n\n<li>While the page is loading, Autoptimize checks for any image URLs in the code of the page. For example:<br><figure><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-uYg4zZucA0.jpg\"><\/figure><br><\/li>\n\n\n\n<li>When an image URL is detected, it\u2019s sent to ShortPixel, where it\u2019s optimized and stored on ShortPixel\u2019s CDN. This process happens only the first time a specific image is requested by a visitor when the page loads.<\/li>\n\n\n\n<li>Autoptimize replaces the original image URL with one that points to our CDN hosting the optimized version. Updated URLs appear after the page is refreshed. If the image hasn\u2019t been processed yet, it will return a 307 temporary redirect instead.<figure><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-gEse8PLB4C.jpg\"><\/figure><br><\/li>\n\n\n\n<li>Your images are now being delivered through our fast CDN!<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>When you enable Image optimization &amp; CDN (Settings &gt; Autoptimize &gt; Images), Autoptimize scans your page\u2019s code and replaces every unoptimized image with its optimized version, delivered through the ShortPixel CDN. Note: Autoptimize will not alter your original files or their metadata on your server. Instead, it optimizes images on-the-fly, triggered whenever a visitor loads [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[36],"glossaries":[],"doc_tag":[],"class_list":["post-697","docs","type-docs","status-publish","hentry","doc_category-autoptimize"],"blocksy_meta":[],"year_month":"2026-04","word_count":201,"total_views":"3993","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\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/697","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=697"}],"version-history":[{"count":5,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/697\/revisions"}],"predecessor-version":[{"id":2671,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/697\/revisions\/2671"}],"wp:attachment":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/media?parent=697"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_category?post=697"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/glossaries?post=697"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_tag?post=697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}