API Reference

The Compress transformation is an essential tool for optimizing the size of your images, improving loading time and website performance. This feature allows you to adjust the image quality or use intelligent compression to achieve an ideal balance between quality and file size.

Parameter structure

/compress:[valor]/

/compress:smart/ Smart compression

/compress:90/ Compression with 90% quality

/compress:50/ Compression with 50% quality

To apply compression, the URL should be formatted as follows:

https://img.voidr.co/my_project/compress:80/fetch/:url

Where the value is a number indicating the image quality after compression, or the word "smart" for smart compression that automatically optimizes the image.

⚠️ The value must be between 10 and 100 or "smart".

Usage example

To compress an image with 70% quality, the URL would be:

https://img.voidr.co/my_project/compress:70/fetch/https://images.unsplash.com/photo-1561336313-0bd5e0b27ec8?

🔥 With this example, we achieved an optimization of 83% from the original size

Original: 1,670kb
Optimized: 280kb