Version: 2.8.0

Using Caravaggio

Caravaggio accept the input image to transform and the transformation to apply.

Try
Copy
https://caravaggio.now.sh/rotate_90,o_png/https://cvg-res.now.sh/landscape.jpg

In this case the image reachable at https://cvg-res.now.sh/landscape.jpg will be rotated of 90° clockwise and the result will be in the webp format.

In general, each transformation is expressed in the form transformation_parameter and can be separated by the next through a comma ,

The url instead, https://cvg-res.now.sh/landscape.jpg is simply a fully qualifid address of the image to fetch and transform.

Complex urls

If the url of the image to transform contains query parameters, you must encode it.
In example, the url https://cvg-res.now.sh/landscape.jpg?user=joe must be sent as

https://caravaggio.now.sh/q_90/https%3A%2F%2Fcvg-res.now.sh%2Flandscape.jpg%3Fuser%3Djoe

or at least

https://caravaggio.now.sh/q_90/https://cvg-res.now.sh/landscape.jpg%3Fuser%3Djoe

In javascript, to obtain this encoding, you can run

const url = 'https://cvg-res.now.sh/landscape.jpg?user=joe';
const encoded = encodeURIComponent(url);
const caravaggioUrl = `https://caravaggio.now.sh/q_90/${encoded}`;

Use similar functions in the language of your choice, they are the same functions used to encode query parameters.