Free Trial
10 days, no credit_card

<< More Tutorials

How to convert an image to JPG, GIF, PNG, TIF or WebP in cURL using rethumb?

To convert an image to JPG, GIF, PNG, TIF or WebP in cURL use the following code:

# First apply a square operation, then convert to PNG format.
# Other formats available: jpg, gif, tiff and webp.
curl http://api.rethumb.com/v1/square/100/format/png/http://images.rethumb.com/image_coimbra_600x300.jpg > resized-image.jpg

Start using this example now

Use the following commands to get started:

$ git clone https://github.com/rethumb/rethumb-curl-examples.git
$ cd rethumb-curl-examples
$ sh format.sh

More examples using cURL