Batch Process
photopea_batch_processApply the same Photopea script to many images and export each to a target format and directory, enabling bulk resizing, conversion, or watermarking.
Instructions
Run the same edit over many images: opens each input, optionally runs a Photopea script on it, exports it to outputDir as . (repeated names get -2, -3) and closes it. Use it for bulk resizing, format conversion or watermarking. Existing files with the same name are overwritten.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"inputs": "<inputs>",
"outputDir": "<outputDir>",
"format": "<format>"
},
"name": "photopea_batch_process"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | Yes | Output format | |
| inputs | Yes | URLs or absolute local file paths of the images | |
| script | No | Photopea JavaScript to run on each image before export, e.g. "app.activeDocument.resizeImage(800, 600);" | |
| quality | No | Compression quality for JPG and WebP (1-100) | |
| outputDir | Yes | Absolute directory path for the exported files (created if missing) |