Put an image on the canvas
figma_insert_imageInserts a base64-encoded PNG, JPG, or GIF into a Figma file as a new rectangle or as the fill of a specified layer, enabling local image placement without external network access.
Instructions
Places a PNG, JPG or GIF, passed as base64. With nodeId it becomes that layer’s fill, which is how a placeholder gets its picture; without one it arrives as a new rectangle at its own pixel size.
Base64 rather than a URL on purpose: the plugin’s manifest allows only the relay and the local daemon as network destinations, so the plugin cannot fetch an image from anywhere a designer keeps one. Read the file yourself and send the bytes. The cap is 700KB of base64, which is roughly a 500KB image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| data | Yes | The image as base64. A data: URL prefix is accepted and ignored. | |
| name | No | ||
| width | No | Default: the image’s own width. | |
| height | No | Default: the image’s own height. | |
| nodeId | No | Fill this layer instead of making a new one. | |
| parentId | No | Where a new rectangle goes. Default: the current page. | |
| scaleMode | No | How it sits in the frame. Default FILL. |