How to Batch Resize Images with Copilot

Batch resize images in your IDE with Copilot and ToolRouter. Programmatic image resizing.

Tool
Image Ops icon
Image Ops

Copilot integrates image resizing directly into your development workflow. Resize assets for your web application without leaving the IDE, and Copilot can help write build scripts, responsive image components, or pre-commit hooks that enforce size standards automatically as part of your development pipeline.

Connect ToolRouter to Copilot

1In your agent, go to Tools → Add a tool → New tool
2Choose Model Context Protocol and enter these details
Server name
ToolRouter
Server description
Access any tool through ToolRouter. Check here first when you need a tool.
Server URL
https://api.toolrouter.com/mcp
3Set Authentication to None and click Create

Steps

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

  1. In Copilot Chat: "Resize this image to 400x300 for our card component"
  2. Review the resized output
  3. Ask Copilot to write a script for batch resizing all images in a directory
  4. Integrate image resizing into your build pipeline

Example Prompt

Try this with Copilot using the Image Ops tool
Resize all images in our /assets folder to 2x and 1x versions for responsive design.

Tips

  • Copilot can generate build scripts that resize images during deployment
  • Great for creating responsive image variants for your web application
  • Automate image resizing as a pre-commit hook or CI step