DevKits

image/*

image/svg+xml

File extensions: .svg

Scalable Vector Graphics — resolution-independent XML-based images.

What is image/svg+xml?

image/svg+xml is the media type for Scalable Vector Graphics. Because SVG is XML, it stays crisp at any zoom level and can be styled with CSS and animated. Icons, logos, and diagrams belong in SVG.

Typical usage

Icons, logos, charts, diagrams, illustrations where sharp rendering at any size matters.

Common gotchas

SVG can execute embedded <script> when loaded as <object> or <iframe> (but not <img>). Sanitize user-uploaded SVG or serve it only inside <img> to prevent XSS.

HTTP header example

Response header

Content-Type: image/svg+xml

Reference

W3C SVG

Related MIME types