Embedded image
fig_imageRetrieve embedded bitmaps from a .fig file using an image hash or node guid, or get the document thumbnail. Save images to disk or view metadata.
Instructions
Fetch a bitmap stored inside the .fig: pass hash (the 40-hex image id reported by fig_node / fig_style on an image paint), or guid to take the image(s) used by that node, or hash:"thumbnail" for the document preview. Small images come back as viewable image content; larger ones come back as metadata (mime, byte size, pixel dimensions) — give savePath to write the exact bytes to disk instead. NOTE: a .fig contains no rendered pictures of frames, only the bitmaps placed in image fills plus thumbnail.png, so this cannot screenshot a design.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to the .fig / .figma file (absolute, or relative to the server CWD). | |
| guid | No | Node guid; uses the image fills on that node. | |
| hash | No | 40-hex image hash, or the literal "thumbnail" for thumbnail.png. | |
| savePath | No | Write the bytes to this path (parent directories are created) instead of inlining. |