What is this? #
As of ShortPixel Image Optimizer (SPIO) version 6, you can serve all your images via the ShortPixel CDN in any format you want: WebP, AVIF or the original JPG/PNG/GIF.

This new feature replaces any image URLs with CDN URLs while keeping the canonical URLs pointing to your own website. This ensures no impact on your website’s SEO or the indexing of your images. Additionally, WebP and AVIF formats are delivered seamlessly from the same CDN URL without requiring any manual intervention, provided these options are enabled in SPIO.
This delivery method is an excellent alternative to others because it works on any hosting environment without needing further configuration. The URL replacement occurs dynamically as the page loads.
Initially, only images embedded in your website’s source code will be delivered via the CDN. In future plugin versions, images in CSS and JS files will also be replaced.
Frequently asked questions #
What happens if I disable the “Create WebP/AVIF Images” settings?
If you disable those, and enable the “Deliver the next-gen images using the ShortPixel CDN” setting, your images will still be served from the ShortPixel CDN, but in its original uploaded format.
Can I use my own custom domain?
Yes, of course! Here are the instructions.
Will this help me save disk space?
No, it will not. This setting simply replaces your image URLs with different ones pointing to https://spcdn.shortpixel.ai/spio
. Additionally, your physical .webp and .avif files will still be created, assuming you have enabled the “Create WebP/AVIF Images” settings.
Does this new setting edit my original URLs in the database?
No, the URL replacement is done on-the-fly, while the page loads. Your database and original URLs will remain intact.
What are the downsides of enabling this option?
Compared to the “Serve WebP/AVIF images from locally hosted files” option, there are two cases where using the CDN may be less effective:
- If your server is powerful and fast enough, and your audience is concentrated in a single region, serving images directly from your server may result in faster delivery than using the CDN. This is because our CDN is beneficial primarily when your server is slow (since our CDN is faster) or when your audience is spread across multiple locations (since your server is in a single region, while our CDN has multiple points of presence).
- This feature works by processing the entire HTML on page load and replacing image URLs with those pointing to shortpixel.ai. While this has a negligible impact on performance in most cases, if your server is slow or your website is particularly heavy, you may achieve better results using the “Without altering the page code (via .htaccess)” delivery method. This method relies on a pure server configuration and avoids the need for page pre-processing.
I just turned on the option, but I cannot see any WebP/AVIF file being served. Why is that?
Please note that the first time an image is accessed, it is registered for storage in the ShortPixel CDN. This process is not immediate, and that’s why to avoid making users wait some time until they are able to access the WebP/AVIF file through the ShortPixel CDN URL, the original image is immediately served via an HTTP 307 redirect, which is a JPG/PNG/GIF. After a short delay—typically a few seconds, or a few minutes in rare cases—the image should be fully available on the CDN and will be displayed upon page refresh. Keep in mind that the time it takes for the WebP/AVIF version to appear may also depend on your browser’s cache. In short, if you are using the ShortPixel CDN, we kindly ask you to wait a few minutes.