compress_image
Reduce image file size without compromising quality by specifying input and output paths, compression quality, and progressive encoding for JPEGs.
Instructions
Compress an image with quality settings
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inputPath | Yes | Path to input image | |
| outputPath | Yes | Path to save compressed image | |
| progressive | No | Use progressive encoding (for JPEG) | |
| quality | No | Compression quality (1-100) |
Input Schema (JSON Schema)
{
"properties": {
"inputPath": {
"description": "Path to input image",
"type": "string"
},
"outputPath": {
"description": "Path to save compressed image",
"type": "string"
},
"progressive": {
"default": true,
"description": "Use progressive encoding (for JPEG)",
"type": "boolean"
},
"quality": {
"default": 80,
"description": "Compression quality (1-100)",
"maximum": 100,
"minimum": 1,
"type": "number"
}
},
"required": [
"inputPath",
"outputPath"
],
"type": "object"
}