Understanding the URL Structure (API URLs)

The initial part of the URL is your zone, it can either be yoursite123abc.zapwp.com or you can use a custom CNAME to make it something like cdn.yoursite.com

q: is quality, the value can be l for lossless, i for intelligent and u for ultra compression mode
r: is for retina, 1 is ON and 0 is OFF | retina on will 2x the pixel density of the image
wp: is for webp conversion, 1 is ON and 0 is OFF
w: is for width, this is a value in pixels that the image is resized to
u: is the original image url that you'd like to optimize and adapt

https://yoursite123abc.zapwp.com/q:i/r:1/wp:1/w:250/u:https://yoursite.com/logo.png
https://cdn.yoursite.com/q:i/r:1/wp:1/w:250/u:https://yoursite.com.com/logo.png

In the above examples, it would optimize a logo from your site at an "intelligent" quality, with retina enabled, webp conversion active and an initial width of 250px (then doubled for retina)



When using the plugin or universal version, these values are automatically adapted based on the incoming visitor to make sure they are getting the optimal image, but you may manipulate them as you wish to use the URL API version of the software with your zone.

As for CSS, JavaScript and other assets, you can use a similar structure for non-images, for example:
https://cdn.yoursite.com.com/m:0/a:https://yoursite.com/wp-content/plugins/elementor/assets/css/frontend.min.css

In this case, the initial part of the URL is your zone, it can either be yoursite123abc.zapwp.com or you can use a custom CNAME to make it something like cdn.yoursite.com

m: is for minification, 1 is ON and 0 is OFF
a: is the original asset url that you'd like to optimize and serve via the CDN
Was this article helpful?
Cancel
Thank you!