import_file
Place an SVG or raster image into the current Inkscape document, scaling vector art or sizing images with optional embed, object-fit, and layer controls.
Instructions
Place a file into the current document. An SVG (e.g. geometry a script generated) becomes one
group scaled to this document's units, its top-left at at (default 0,0); width or height scales it
(both: stretch). Its layers become labelled groups, its defs join ours, clashing ids get "-" in front.
An image (png/jpg/gif/webp/bmp) becomes an image element: natural size at 96 dpi unless width/height
(one keeps the ratio), linked by default (embed: true stores the pixels in the SVG), object_fit
contain|cover|fill for a given box. Relative paths start at the document's folder.
For whole documents use document_open; for data rows see repeat rows_path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | ||
| id | No | ||
| path | Yes | ||
| embed | No | ||
| layer | No | ||
| width | No | ||
| doc_id | No | ||
| height | No | ||
| parent | No | ||
| preview | No | ||
| object_fit | No |