Render a node to an image
fig_renderRender any frame, component, shape, text, or page from a local .fig file to PNG or SVG for visual inspection, fully offline.
Instructions
Render a node — frame, component, instance, group, shape, text, or a whole page — to a PNG the model can look at, or to SVG. Fully offline: geometry, text outlines and images all come from the file. Rendering is best-effort: read approximated and unsupported in the report before trusting fine details; exact values remain available from fig_node / fig_style / fig_text. Default output is PNG at 2x, capped to 1568 px on the longest edge; use savePath to write a file instead of inlining it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to the .fig / .figma file (absolute, or relative to the server CWD). | |
| guid | Yes | Node to render, e.g. "2:1339". A page guid renders the whole page, downscaled to fit maxSize. | |
| scale | No | Device scale factor. Default 2. Lowered automatically to respect maxSize. | |
| format | No | Default "png". Falls back to SVG text when the optional rasterizer is not installed. | |
| maxSize | No | Longest edge in pixels. Default 1568. | |
| maxNodes | No | Refuse subtrees larger than this. Default 20000. | |
| savePath | No | Write the PNG/SVG to this path (directories are created) instead of inlining it. Required when the PNG exceeds 2097152 bytes or the SVG exceeds 50000 characters. | |
| background | No | Default "transparent". "page" fills with the page background colour. |