How to use Fastly with ShortPixel Adaptive Images

To use Fastly as your CDN when using ShortPixel Adaptive Images, instead of ShortPixel's CDN, follow these steps:

  1. Create an account with Fastly if you have not already done so:
  2. Go to Deliver > Create a Delivery service.

  3. Name the service for better organization. Go to Options > Edit service name in the top bar and give it a better name. For example, "SPAI with Fastly".

  4. Think about a name for the subdomain you want the images to be delivered from. For example, if your domain is, you could choose If "img" is already used by another CNAME, think of something else, like or
  5. Assuming you have chosen "img", now enter "" as the domain.

  6. Go to Origins, on the left, and enter "" as your host.

  7. Activate the Service.

  8. In your DNS editor, from your domain (ask your domain provider if you don't know where it is), add a new CNAME record from to "".

    Remember that should be changed to your actual domain.

  9. Wait 5 minutes for your domain provider to complete all technical tasks in the background.
  10. Check with this tool if your CNAME is propagated correctly. If not, wait 24h-48h.
  11. Take any image URL from your website, append it to (note that it does not have HTTPS, we will take care of that later) and make sure that the new URL can be accessed. Example:
    1. If your website is called, your new CNAME is, and your sample image is,
    2. try to access this URL:
    3. Can you view it without errors? Proceed to the next step.
  12. Return to Fastly and go to Secure > TLS Management and click on Get started.

  13. Add your custom subdomain (in our case "") and click on Add.

  14. Now click Submit at the bottom of the page and wait for the process to complete.

  15. You have done everything on Fastly. Now go to your WordPress website and change the API URL of ShortPixel AI.
    1. Go to Settings > ShortPixel AI > Behaviour and enter in the API URL field.
    2. Replace with your actual domain name.
    3. Replace the img part if your subdomain is different, like configured above.

  16. Clear your WordPress cache: How to clear WordPress cache
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us