Can I use a different CDN with ShortPixel Adaptive Images?
If you want to use a different CDN than the default cdn.shortpixel.ai when using ShortPixel Adaptive Images, follow the instructions below:
- Edit your DNS records to add a CNAME from
cdn.example.com
tono-cdn.shortpixel.ai
. This step might be slightly different depending on what CDN you use. Below you can see some examples, but we recommend you contact your CDN provider so they can help you set this up.- On the previous URL, replace
example.com
with your actual domain name. - If
cdn.example.com
is already being used on your DNS records, you can change it to whatever you want, likeimages.example.com
orimg.example.com
.
- On the previous URL, replace
- Make sure the new record (cdn.example.com) works as expected with an online tool like whatsmydns.net.
- Go to Settings > ShortPixel AI > Behaviour > API URL and enter the following URL:
https://cdn.example.com/spai
- Replace
example.com
with your actual domain name. - Replace the
cdn
part if your subdomain is different, like configured above. - Please note that if you're not using Cloudflare as CDN, then your CDN should be able to handle the SSL certificate so you can have the API URL with
https
. If they cannot handle this, a certificate error will occur and your API URL should start withhttp
instead ofhttps
.
- Replace
Examples
Here you will find instructions on how to do the previous steps for the most important CDN providers.