Render SVG to image
render_svgRasterize an SVG into a PNG to visually verify layout, alignment, overflow, and colors before shipping.
Instructions
Rasterize an SVG to a PNG and return it INLINE as an image so you can actually SEE the result. Use it right after writing or editing any SVG — a diagram, UI mockup, chart, icon, logo, or badge — to visually verify layout, alignment, overflow, and colors before shipping. Accepts inline markup (svg) or a file (path), and can also save the PNG to disk (outPath).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | No | Inline SVG markup. Provide this OR `path`. | |
| path | No | Path to a .svg file. Provide this OR `svg`. | |
| scale | No | Zoom multiplier for the raster (default 1; use 2 for crisp/retina output). | |
| background | No | Background behind the SVG, e.g. '#ffffff' or 'white'. Default: transparent. | |
| outPath | No | If set, also write the rendered PNG to this file path. |