Media
Professional image resizing tool with multiple resize methods, aspect ratio preservation, and format conversion, supporting GIF/Animated WebP/APNG and JPEG/PNG/WEBP.
Call this tool from your code in three languages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/image-resize' \
-F 'file=@/path/to/imageFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/en/api/tools/image-resize' \
-F 'imageFile=/path/to/file.ext' \
-F 'resizeMode=pixels' \
-F 'width=0' \
-F 'height=0' \
-F 'aspectRatio=custom' \
-F 'fit=contain' \
-F 'position=center' \
-F 'background=#000000' \
-F 'blurBackground=true' \
-F 'blurSigma=20' \
-F 'kernel=lanczos3' \
-F 'format=original' \
-F 'quality=90' \
-F 'upscale=true' \
-F 'progressive=false' \
-F 'stripMetadata=true'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/image-resize| Name | Type | Required | Description |
|---|---|---|---|
| imageFile | fileupload required | Yes | — |
| resizeMode | select | No | — |
| width | number | No | — |
| height | number | No | — |
| aspectRatio | select | No | — |
| fit | select | No | — |
| position | select | No | — |
| background | color | No | — |
| blurBackground | checkbox | No | — |
| blurSigma | range | No | — |
| kernel | select | No | — |
| format | select | No | — |
| quality | range | No | — |
| upscale | checkbox | No | — |
| progressive | checkbox | No | — |
| stripMetadata | checkbox | No | — |
File result
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-image-resize": {
"name": "image-resize",
"description": "Professional image resizing tool with multiple resize methods, aspect ratio preservation, and format conversion, supporting GIF/Animated WebP/APNG and JPEG/PNG/WEBP.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=image-resize",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "image-resize",
"arguments": {
"imageFile": "https://example.com/file.ext",
"resizeMode": "pixels",
"width": 0,
"height": 0,
"aspectRatio": "custom",
"fit": "contain",
"position": "center",
"background": "#000000",
"blurBackground": true,
"blurSigma": 20,
"kernel": "lanczos3",
"format": "original",
"quality": 90,
"upscale": true,
"progressive": false,
"stripMetadata": true
}
}
}Questions or issues? Contact [email protected]