How to use Cloudflare with ShortPixel Adaptive Images

Note: If you're having SiteGround as your hosting provider you  cannot properly set Cloudflare and use it as a CDN together with ShortPixel Adaptive Images. For more information, visit this page: CDN via Cloudflare for websites hosted at SiteGround, it this possible?

If you want to use Cloudflare as your CDN when using ShortPixel Adaptive Images, instead of ShortPixel's CDN, follow these steps:

  1. Enter your Cloudflare account
  2. Select the DNS section from the top menu.

  3. Add a new CNAME record from to

    Remember that should be changed to your actual domain, and that cdn should be changed to something else if it's already being used. For example:

    The little cloud must be orange so you can use the CDN features offered by Cloudflare.

  4. Wait 5 minutes for Cloudflare to finish up all the technical tasks in the background.

  5. Take any image URL from your site, append it to and make sure that the new URL can be accessed. Example:

    1. If your website is, your new CNAME on Cloudflare is, and your example image is
    2. ...try to access this URL:
    3. Can you view it with no errors? Continue to the next step.
  6. Go to Settings > ShortPixel AI > Behaviour and enter in the API URL field

    1. Replace with your actual domain name.
    2. Replace the cdn part if your subdomain is different, like configured above.
  7. Clear the CSS cache from ShortPixel AI's settings:

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