set_image_fill
Sets a Figma node fill to base64-encoded image data, so generated PNG, JPEG, or WebP imagery can be placed directly on the canvas.
Instructions
Set a node's fill to a base64-encoded image. Use with image generation APIs (Replicate, fal.ai) to place rendered imagery directly on canvas.
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": {
"nodeId": "<nodeId>",
"base64": "<base64>"
},
"name": "set_image_fill"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base64 | Yes | Base64-encoded image data (PNG, JPEG, or WebP) | |
| nodeId | Yes | Figma node ID | |
| opacity | No | ||
| mimeType | No | image/png | |
| scaleMode | No | How the image is scaled within the node bounds | FILL |