Media
Convert WebP images to optimized WebP format with advanced compression settings
Call this tool from your code in three languages.
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/webp-to-optimized-webp' \
-H 'Content-Type: application/json' \
-d '{"filename":"imageFile.ext","contentType":"application/octet-stream","size":12345}'
# 2) PUT the file bytes directly to the presigned uploadUrl
curl -X PUT '<presigned uploadUrl>' \
--data-binary @/path/to/file.ext
# 3) Call the tool, passing the returned storageKey for each file field
curl -X POST 'https://api.elysiatools.com/en/api/tools/webp-to-optimized-webp' \
-F 'imageFile=uploads/2026/01/01/your-tool-1700000000000-abc123.ext' \
-F 'quality=85' \
-F 'effort=6' \
-F 'method=6' \
-F 'filterStrength=80' \
-F 'filterSharpness=2' \
-F 'filterType=1' \
-F 'smartSubsample=true' \
-F 'autoFilter=true' \
-F 'nearLossless=false'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/webp-to-optimized-webp| Name | Type | Required | Description |
|---|---|---|---|
| imageFile | fileupload required | Yes | — |
| quality | range | No | Higher quality = larger file size. 90+ enables near-lossless |
| effort | range | No | Maximum effort for best compression ratio |
| method | range | No | Maximum method for best compression quality |
| filterStrength | range | No | Strength of the deblocking filter |
| filterSharpness | range | No | Filter sharpness for preserving edges |
| filterType | number | No | 0: simple, 1: strong, 2: cross |
| smartSubsample | checkbox | No | Optimize chroma channel processing |
| autoFilter | checkbox | No | Let the encoder choose optimal filter settings |
| nearLossless | checkbox | No | Very high quality with minimal compression |
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-webp-to-optimized-webp": {
"name": "webp-to-optimized-webp",
"description": "Convert WebP images to optimized WebP format with advanced compression settings",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=webp-to-optimized-webp",
"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": "webp-to-optimized-webp",
"arguments": {
"imageFile": "https://example.com/file.ext",
"quality": 85,
"effort": 6,
"method": 6,
"filterStrength": 80,
"filterSharpness": 2,
"filterType": 1,
"smartSubsample": true,
"autoFilter": true,
"nearLossless": false
}
}
}Questions or issues? Contact [email protected]