cd /news/generative-ai/we-benchmarked-gpt-image-2-6-native-… · home › topics › generative-ai › article
[ARTICLE · art-165202] src=dev.to ↗ pub= topic=generative-ai verified=true sentiment=↑ positive

We Benchmarked GPT-Image-2.6 Native <svg> Output: Path Counts, Cost & Real Edge Cases

A developer benchmarked gpt-image-2.6's native output_format: "svg" support while building GPTSVG Studio, finding that native LLM-authored SVG geometry produces compact files (0.9 KB to 9.6 KB, 5 to 28 paths) with grouped layers and no embedded raster bitmaps, unlike auto-traced raster output. The benchmark also found native SVG output is restricted to text prompts, with image-edit endpoints rejecting the format, and the developer open-sourced the sample outputs and a zero-dependency TypeScript XML AST sanitizer under MIT, warning that LLM-generated SVG should never be injected via innerHTML.

by read2 min views1 publishedNov 6, 2026

Most "AI vector generators" over the past two years did the exact same thing under the hood: generate a raster PNG, then run an aggressive auto-tracer over it—leaving you with 1,800 jagged <path> nodes and muddy gradients that bog down Figma.

With gpt-image-2.6 adding native output_format: "svg" support, we ran a structured benchmark while building GPTSVG Studio to see whether native LLM-authored <svg> geometry is actually clean enough for production frontend and brand work.

All raw .svg sample outputs, rendered previews, and our standalone zero-dependency TypeScript XML AST sanitizer are open-sourced under MIT here:

👉 GitHub Benchmark & Sanitizer Repo: https://github.com/keokeo/gpt-image-2-6-svg-benchmark <g id="..."> layers—not traced soup0.9 KB – 9.6 KB), zero embedded data:image/png bitmaps, and readable group IDs: | Preset | Quality | Raw Size | Elements / Paths | Embedded Raster |

| :--- | :--- | :--- | :--- | :--- | | Minimal Geometric Logo | medium | 1.4 KB | 6 elements | 0 |

| Wordmark + Mark | medium | 2.1 KB | 9 elements | 0 |

| 24×24 Monoline UI Icon | low | 0.9 KB | 5 strokes | 0 |

| Die-Cut Sticker | medium | 9.6 KB | 28 paths | 0 |

| Shield / Crest Badge | low | 1.9 KB | 8 paths | 0 |

Native output_format: "svg" is strictly Text-to-SVG Upstream providers currently restrict native SVG output to text prompts; image-edit endpoints reject output_format: "svg". For Image to SVG conversion, we paired a zero-upload client-side Web Worker k-means vectorizer (free, runs 100% locally in your browser) with an optional flat-palette AI redraw pass.

Never inject LLM-generated SVG with innerHTML

Inline <svg> is executable XML. Treat model-generated SVG as untrusted input: parse it into an XML AST, rebuild only allow-listed geometry tags/attributes (stripping <script>, <foreignObject>, on* handlers, and external href references), serve stored files with Content-Security-Policy: default-src 'none'; sandbox, and render previews via <img src="blob:...">. Happy to share raw SVG snippets or sanitizer edge cases if anyone else is building vector tooling!

── more in #generative-ai 4 stories · sorted by recency
── more on @gpt-image-2.6 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/we-benchmarked-gpt-i…] indexed:0 read:2min 2026-11-06 · —