ToolsXpo
API DocGuides

Process images in automations

Convert, compress and resize images on a schedule or a trigger: feed in uploaded files or URLs, and pass the results on as links to email, webhooks or other steps.

Updated October 4, 2026

The Image Converter and Image Compressor are ordinary tool steps in the automation builder. Add one, choose the tool, and every option is there — format, quality, target size, resize, background.

Where the images come from

A URL. Put it in imageUrl — typed in, or a reference such as {{trigger.body.image}} from an inbound webhook.

Several URLs. images takes a list, one URL per line or comma-separated.

Files you uploaded. Start the automation with a Source Files step, then put {{previous_step}} in the image step's images field. Every uploaded file is processed, up to ten per step.

Where the results go

Converted images are saved as files, and the step's output carries a link for each one instead of the image data:

JSON
{ "results": [ { "ok": true, "format": "webp", "bytes": 143210, "savedPercent": 82.4,
                 "url": "https://ai-cdn.toolsxpo.com/…/a1b2c3.webp" } ],
  "summary": { "succeeded": 1, "failed": 0 } }

So a later step can use them directly:

Next stepFieldValue
Send emailbodyYour image: {{previous_step.results.0.url}}
Send webhookbody{"image": "{{previous_step.results.0.url}}"}
Another image stepimageUrl{{previous_step.results.0.url}}
Any step—{{step_2.results.1.url}} for the second image of step 2

Files are kept for your plan's file-retention period, then removed.

Fields for an image step

Every field from the API reference is available in the step editor — required ones first, the rest under Optional settings. In short:

FieldImage ConverterImage Compressor
imageUrl / imageone image (URL, or base64)same
imagesa batch: a Source Files step ({{previous_step}}), a JSON array, or URLs one per linesame
formatrequired: jpeg png webp avifoptional, auto keeps the format
quality1–1001–100
targetKb—aim for this size
losslesstrue / false—
maxWidth, maxHeightshrink to fitshrink to fit
backgroundfill for transparency in JPEGsame
outputleave as url in automationssame

What the step outputs — and what later steps can reference — is the same results / summary object the API returns: {{previous_step.results.0.url}}, .bytes, .savedPercent, .width, .ok, .error, and {{previous_step.summary.succeeded}}. The full list is in the response reference.

A worked example: shrink uploads for the web

  1. Source Files — upload up to ten photos.
  2. Image Compressor — images: {{previous_step}}, format: webp, maxWidth: 1600, targetKb: 250.
  3. Send email — list the links: {{previous_step.results.0.url}}, {{previous_step.results.1.url}} …

Good to know

  • Values in the builder are text; true/false and numbers are understood as you would expect.
  • An image that fails does not fail the step — its entry has ok: false and an error, and costs nothing. If every image fails, the step fails and is refunded.
  • Cost is the same as an API call: 1 credit plus 1 per billable unit (see Convert and compress images with the API).

Tools covered here

Image Converter

Image & SVG

Image Compressor

Image & SVG

automationimagesworkflowwebpcompress

Related