batch_resize
Resize one image into multiple dimensions simultaneously. Specify custom widths, heights, and suffixes for each output. Save resized versions in JPEG, PNG, WebP, or AVIF formats efficiently.
Instructions
Generate multiple sizes from one image
Input Schema
Name | Required | Description | Default |
---|---|---|---|
format | No | Output format for all sizes | |
inputPath | Yes | Path to input image | |
outputDir | Yes | Directory to save resized images | |
sizes | Yes | Array of sizes to generate |
Input Schema (JSON Schema)
{
"properties": {
"format": {
"description": "Output format for all sizes",
"enum": [
"jpeg",
"jpg",
"png",
"webp",
"avif"
],
"type": "string"
},
"inputPath": {
"description": "Path to input image",
"type": "string"
},
"outputDir": {
"description": "Directory to save resized images",
"type": "string"
},
"sizes": {
"description": "Array of sizes to generate",
"items": {
"properties": {
"height": {
"description": "Height in pixels",
"type": "number"
},
"suffix": {
"description": "Suffix to add to filename",
"type": "string"
},
"width": {
"description": "Width in pixels",
"type": "number"
}
},
"required": [
"width",
"suffix"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"inputPath",
"outputDir",
"sizes"
],
"type": "object"
}