Skip to main content
This page tests approaches to embedding an animated SVG, to verify which survive Mintlify’s image optimizer on deployment.

Approach A — Markdown image reference (BROKEN)

Imgix detects width/height on the SVG, generates srcset URLs with explicit w= params, and rasterizes to PNG/WebP — stripping SMIL animations. Animated SVG via markdown

Approach B — Inline SVG markup (BROKEN)

MDX strips all SVG children during bundling — the <svg> tag renders empty.

Approach C — HTML <img> tag (BROKEN)

Mintlify also processes <img> tags through imgix — same rasterization as A. Animated SVG via img tag

Approach D — <object> tag (BROKEN)

Mintlify strips <object> tags entirely from the rendered output.

Approach E — Markdown ref to SVG with viewBox only, no width/height (testing)

Root cause says imgix only processes SVGs with known dimensions. This SVG has only viewBox, no width/height attributes — imgix may skip srcset generation and serve it as-is. Animated SVG no size via markdown

Approach F — <iframe> pointing to Mintlify-hosted SVG (testing)

An iframe creates a fully separate browsing context — but the SVG still goes through Mint CDN, which may sanitize it.

Approach G — <iframe> pointing to externally hosted SVG (testing)

SVG served directly from GitHub raw (outside Mintlify’s CDN entirely). If the animation survives here, it confirms the CDN pipeline is the culprit and this is a viable customer workaround.

Results so far

ApproachLocalDeployed
A — Markdown ![]() with sized SVG✅ animated❌ imgix rasterizes
B — Inline SVG✅ animated❌ MDX strips children
C — <img> tag✅ animated❌ imgix rasterizes
D — <object> tag✅ animated❌ Mintlify strips element
E — Markdown ![]() with viewBox-only SVG??
F — <iframe> (Mintlify-hosted SVG)??
G — <iframe> (externally hosted SVG)??