How to Compress Images with OpenClaw
Batch compress images with OpenClaw and ToolRouter. Automate image optimisation across large asset libraries.
ToolCompressOpenClaw 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-mcp2Call tools directly from OpenClaw
toolrouter-mcp call web-search search --query "AI tools"
toolrouter-mcp toolsSteps
Once connected (see setup above), use the Compress tool:
- Provide a list of image URLs: "Compress all of these images"
- OpenClaw processes each file and returns compressed download links
- Log the before/after sizes for each image
- 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