Version: 3.0.0

Output

Caravaggio can return your image in another format. You my want to transform a png image into a progressive jpeg.
Caravaggio supports original, auto, jpeg, png, webp, avif (from v3.5.0) and tiff.

Example

Try
Copy
https://caravaggio.now.sh/o:png/?image=https://cvg-res.now.sh/girls.jpeg
Try
Copy
https://caravaggio.now.sh/o:webp/?image=https://cvg-res.now.sh/girls.jpeg

If you specify nothing or you enter o:original, the same format as the input image will be returned.

Auto

auto is a special value, With this Caravaggio will try to understand the best output format depending on the browser request. Usually, if the browser supports it, the result will be in webp. The resulting image will have a private cache header so that requesting browser can cache it. Therefore it will skip any CDN cache or internal Caravaggio cache.

Notes

If you installed caravaggio through the global npm module, you may need to ensure your version of libvips supports the image formats you need. See the sharp documentation external-link about this.