Adaptive Images API

Our Adaptive Images plugin's API can be used directly and integrated into any website, regardless of the technology used. There is also a JavaScript Adaptive Images library available, that you may want to consider.

API URL sections:

https://cdn.shortpixel.ai/client/w_300,q_lossy,ret_wait/https://shortpixel.com/img/tests/beautiful-woman.jpg

  1. The CDN URL: https://cdn.shortpixel.ai/
  2. Client section: /client/
    • any alphanumeric string can be used
    • this string is used as a caching key so these URLs are considered different:
      https://cdn.shortpixel.ai/client/w_300,q_lossy,ret_wait/https://shortpixel.com/img/tests/beautiful-woman.jpg
      https://cdn.shortpixel.ai/other-client/w_300,q_lossy,ret_wait/https://shortpixel.com/img/tests/beautiful-woman.jpg

  3. Parameters: /w_300,q_lossy,ret_wait/
    The image is optimized, converted, etc, based on these parameters. The parameters can be separated by comma (,) like you see in the examples on this page or by plus (+): /w_300+q_lossy+ret_wait/. All the possible parameters are explained in detail below.

  4. The original URL: https://shortpixel.com/img/tests/beautiful-woman.jpg
    • The URL needs to be absolute and to point to an image, PDF, CSS or JS file
    • both http and https protocols can be used
    • in case http(s) is missing then https will be assumed

Parameters in detail






ShortPixel Knowledge Base
×