Place Image
photopea_place_imagePlace an image from a URL or local file path into the active Photopea document as a new layer, with optional width, height, and x/y positioning.
Instructions
Place an image into the active document from a URL or local file path. Creates a new layer with the placed image as the active layer. Use width/height to resize while preserving aspect ratio, or x/y to position the layer.
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": {
"source": "<source>"
},
"name": "photopea_place_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | X position offset in pixels from the left edge | |
| y | No | Y position offset in pixels from the top edge | |
| name | No | Display name for the placed layer in the layers panel | |
| width | No | Resize to this width in pixels (preserves aspect ratio if only one dimension is set) | |
| height | No | Resize to this height in pixels (preserves aspect ratio if only one dimension is set) | |
| source | Yes | URL or absolute local file path of the image to place |