import_image
Import a raster image as a rectangle with image fill, using base64 data or URL, with optional dimensions and scale mode (FILL/FIT/CROP/TILE).
Instructions
Import a raster image (PNG / JPG / GIF) and place it as a rectangle with an IMAGE fill. Provide data (base64-encoded image bytes) or url. The rectangle defaults to the image size unless width/height are given. scaleMode is FILL / FIT / CROP / TILE (default FILL). For vector SVG (logos / icons) use import_svg instead. Returns { ok, nodeId, name, type }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| url | No | Image URL to fetch instead of data | |
| data | No | Base64-encoded image bytes (PNG / JPG / GIF) | |
| name | No | Optional name for the new rectangle | |
| width | No | Override width (default: image width) | |
| height | No | Override height (default: image height) | |
| parentId | No | Parent node id (default: current page) | |
| scaleMode | No |