resize_image
Resize images to specific dimensions using scale, fit, cover, or thumb methods. Adjust image width and height while maintaining quality with TinyPNG compression.
Instructions
Resize an image file
Input Schema
Name | Required | Description | Default |
---|---|---|---|
height | Yes | The height to resize the image to | |
imagePath | Yes | The ABSOLUTE path to the image file to resize | |
method | No | The method describes the way your image will be resized. | fit |
outputPath | No | The ABSOLUTE path to save the resized image file | |
width | Yes | The width to resize the image to |
Input Schema (JSON Schema)
{
"properties": {
"height": {
"description": "The height to resize the image to",
"example": 1024,
"type": "number"
},
"imagePath": {
"description": "The ABSOLUTE path to the image file to resize",
"example": "/Users/user/Downloads/image.jpg",
"type": "string"
},
"method": {
"default": "fit",
"description": "The method describes the way your image will be resized.",
"enum": [
"scale",
"fit",
"cover",
"thumb"
],
"example": "fit",
"type": "string"
},
"outputPath": {
"description": "The ABSOLUTE path to save the resized image file",
"example": "/Users/user/Downloads/image_thumbnail.jpg",
"type": "string"
},
"width": {
"description": "The width to resize the image to",
"example": 1024,
"type": "number"
}
},
"required": [
"imagePath",
"width",
"height"
],
"type": "object"
}