Version: 3.0.0

Using Caravaggio

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

Try
Copy
https://caravaggio.now.sh/rotate,v:90/o:png/?image=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 png format.

In general, each transformation is expressed in the form transformationName,parameter:value and can be separated by the next through a slash /

If the operation accept only a parameter, it can be shortened as transformationName:value, for example o:webp is the same as o,value:webp

If the value is boolean, it can be omitted when true, so, for example progressive is the same as progressive:true.

It's easier than it sounds and you can find the documentation for each operation here on the left.

The url instead, https://cvg-res.now.sh/landscape.jpg is simply a fully qualified 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/?image=https%3A%2F%2Fcvg-res.now.sh%2Flandscape.jpg%3Fuser%3Djoe

or at least

https://caravaggio.now.sh/q:90/?image=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/?image=${encoded}`;

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