figma_set_image_fill
Applies an image fill to one or more Figma nodes from base64 data or a JPEG/PNG file path, with FILL, FIT, CROP, or TILE scaling modes.
Instructions
Set an image fill on one or more Figma nodes. The imageData parameter accepts EITHER a base64-encoded image string (JPEG/PNG) OR an absolute file path starting with / (e.g. /tmp/photo.jpg). When a file path is provided, the server reads the image from disk — this is preferred for large images since it avoids parameter truncation. The image is decoded in the browser bridge and passed as raw bytes to the Figma plugin. Requires Canvas Bridge plugin.
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": {
"nodeIds": "<nodeIds>",
"imageData": "<imageData>"
},
"name": "figma_set_image_fill"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeIds | Yes | Array of node IDs to apply the image fill to | |
| imageData | Yes | Base64-encoded image data OR an absolute file path (starting with /) to a JPEG/PNG file on disk | |
| scaleMode | No | How the image fills the node (default: FILL) |