Adaptive Images API parameters

If you want to implement your own solution to get the same benefits as ShortPixel Adaptive Images (for example, if your website is not based on WordPress), you can use our API and documentation here.

First of all, the URLs should consist of 3 parts:

https://cdn.shortpixel.ai/client/parameter1,parameter2/url_of_image
  1. https://cdn.shortpixel.ai/client  - this is fixed and the same for every image.
  2. parameter1,parameter2  - the API parameters, comma-separated (see below).
  3. url_of_image  - the original URL of the image.

Then this is a list of parameters that can be used when calling the ShortPixel Adaptive Images API (e.g. no-cdn.shortpixel.ai or cdn.shortpixel.ai).

You can also minimize and serve minimized versions of your CSS or JS files hosted on the CDN. You only need a single parameter, namely ret. Examples:
https://cdn.shortpixel.ai/client/ret_img/http://shortpixel.com/img/tests/test.css
https://cdn.shortpixel.ai/client/ret_img/http://shortpixel.com/img/tests/test.js

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