Chrome is not loading SVG File as image/svg+xml Chrome is not loading SVG File as image/svg+xml google-chrome google-chrome

Chrome is not loading SVG File as image/svg+xml


There is no attribute type on the img element, you need to set the MIME type correctly on the server. I think it only works in IE because it's doing content sniffing.

On IIS7 and above you can specify MIME type mappings in the web.config file in the system.webServer section:

<staticContent>  <mimeMap fileExtension=".svg" mimeType="image/svg+xml"/></staticContent>

After that it should work in all browsers, but you may need to do a force refresh (Ctrl + F5) to get them to request the file again.