How to Compress Images with OpenClaw

Batch compress images with OpenClaw and ToolRouter. Automate image optimisation across large asset libraries.

Tool
Compress icon
Compress

OpenClaw compresses images in bulk — process an entire asset library, run optimisation on a schedule as new images are added, and maintain a compressed copy alongside originals without touching each file manually.

Connect ToolRouter to OpenClaw

1Install the CLI
npm install -g toolrouter-mcp
2Call tools directly from OpenClaw
toolrouter-mcp call web-search search --query "AI tools"
toolrouter-mcp tools

Steps

Once connected (see setup above), use the Compress tool:

  1. Provide a list of image URLs: "Compress all of these images"
  2. OpenClaw processes each file and returns compressed download links
  3. Log the before/after sizes for each image
  4. Route the compressed files to your CDN or asset storage

Example Prompt

Try this with OpenClaw using the Compress tool
Compress all images in this list and return a table of original size, compressed size, and download URL for each: [list of URLs].

Tips

  • Schedule bulk compression to run when new images are uploaded to your asset bucket
  • Build a size audit table to track total savings across your asset library
  • Pair with a CDN upload step to replace originals with optimised versions automatically