Category: Image

image/svg+xml

image/svg+xml is the XML-based vector graphics format for two-dimensional interactive graphics, icons, and logos.

MIME / CONTENT-TYPE

image/svg+xml

ASSOCIATED EXTENSIONS

.svg

PRIMARY CATEGORY

Image

HTTP Headers & Web Server Configurations

Standard HTTP Response Header
Content-Type: image/svg+xml

Send this exact header in HTTP responses to instruct browsers how to decode and render the payload.

Node.js / Express / Web API
res.setHeader("Content-Type", "image/svg+xml"); res.setHeader("Content-Security-Policy", "default-src 'none'");
NGINX Configuration (mime.types)
types { image/svg+xml svg svgz; }
Apache (.htaccess / httpd.conf)
AddType image/svg+xml .svg

Security Advisory & Hardening

CRITICAL SECURITY: SVGs can contain `<script>` tags and onload event handlers. If users upload SVGs, sanitize them thoroughly (e.g. with DOMPurify) or serve them from an isolated domain with `Content-Security-Policy: default-src 'none'`.

Frequently Asked Questions

image/svg+xml Questions & Answers

Common questions regarding MIME types, Content-Type headers, and web server configurations.

The standard HTTP response header is: "Content-Type: image/svg+xml".