Can I use a different CDN with your service?

If you're interested in using a different CDN with ShortPixel AI service please:

  1. Edit your DNS records and add a CNAME from your-cdn.example.com to no-cdn.shortpixel.ai
  2. in your WordPress plugin add a code snippet like the example below. To add a code snippet you can use a plugin like this one.

add_filter('autoptimize_filter_extra_imgopt_base_url','use_my_own_cdn');
function use_my_own_cdn($urlIn) {
return str_replace('cdn.shortpixel.ai','your-cdn.example.com',$urlIn);
}

Here's an example of how the DNS configuration looks like when using Cloudflare:

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

  3. Add a new records following this example

  4. Note that "example-cdn" should be changed to whatever you wish. Make sure the cloud is yellow to use the CDN features offered by Cloudflare

Still need help? Contact Us Contact Us