import_image
Import external images such as SVG, PNG, JPG, or EMF into Visio diagrams as shapes, solving the problem of missing masters for custom icons or vendor logos.
Instructions
Insert an external image (SVG, PNG, JPG, EMF, ...) onto the page as a shape — for custom icons that have NO Visio master (e.g. the newer Azure 'Subnet' glyph) or vendor logos.
Args: source: a LOCAL file path OR a direct http(s) IMAGE URL. A URL must point at the raw image bytes; icon web pages (single-page-app galleries such as az-icons.com) return HTML and are rejected with guidance — download the file in the browser and pass its path. x, y: shape CENTER in inches from the bottom-left. width_in / height_in: size in inches. Give just one to scale the other automatically and preserve the image's aspect ratio; omit both to keep the image's native size.
Prefer built-in masters (drop_shape) when Visio has the icon; use this for the gaps. Returns the shape_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| page | No | ||
| source | Yes | ||
| width_in | No | ||
| height_in | No |