Tools API Blog
Sign in Create account

Resize, convert and compress images

Images is an API that resizes, changes the format and compresses an image. Great for prepping photos and screenshots for web, email or social media from n8n, Make or Zapier, with no servers to maintain.

How it works

You send an image (JPEG, PNG, WebP, AVIF, GIF or TIFF). You tell it what to change: size (width/height), output format (format) and/or compression (quality). It returns the processed image. At least one of those four fields is required. If there's nothing to change, the request fails instead of spending a credit for doing nothing.

Two limits worth knowing: of an animated GIF only the first frame is processed (this tool works with one image, not animations), and HEIC photos (the iPhone's default format) aren't supported yet. Convert them to JPEG before sending.

All you need

  • Your API key. Create it in your dashboard with "+ Create key". It's shown only once, so copy and save it.
  • In your automation platform, an "HTTP Request" step (n8n, Make, Zapier, Pipedream… all have one).

Resize an image

You send your image as is (as binary data) and the size you want as Query Parameters. In the HTTP Request node:

  • Method: POST
  • URL: https://api.cofferdock.com/images
  • Send Headers: on → add two: x-api-key = your key, and Content-Type = your image's type (e.g. image/jpeg)
  • Send Body: on → choose the binary file option (in n8n: "n8n Binary File")
  • Query Parameters: width = 800 (for example)

Under Options → Response → Response Format choose File to get the processed image directly.

Change the format or compress

Add format (jpeg, png, webp or avif) and/or quality (1 to 100) as Query Parameters, same as width/height. For example format=webp&quality=70 to convert to compressed WebP.

In Make: same method and URL, the parameters in Query String, the headers, and the image as binary data in the body.

Available parameters

ParameterWhat it does
widthResult width in pixels.
heightResult height in pixels.
fitHow to fit the image when you give both width and height. Defaults to never cropping or distorting.
formatOutput format: jpeg, png, webp or avif. If you don't set it, the original format is kept.
qualityQuality/compression, 1 to 100. The lower, the smaller the file and the more loss.

What you get back

The processed image directly (or as base64 with output=json).