How To Force SVG To Use the Correct Content-Type

Published Date Author: , Posted April 22nd, 2016 at 3:31:19pm

If when trying to use SVG as an image <img src=”image.svg”> or as a CSS background-image, the browser doesn’t display it, your web host is probably serving the SVG with the wrong content-type.

Add this to your web server config or .htaccess file:

AddType image/svg+xml .svg .svgz

No comments as yet.

Leave Your Comment  Leave a comment

All fields marked with "*" are required.