Tutorial Serve SVG with the Correct Content Type

If you are trying to use SVG like or as a CSS background-image, and the file is linked to correctly and everything seems right, but the bro...

If you are trying to use SVG like or as a CSS background-image, and the file is linked to correctly and everything seems right, but the browser isn't displaying it, it might be because your server is serving it with an incorrect content-type.
Add this to your .htaccess file at the root to fix it:
AddType image/svg+xml .svg .svgz

Hot in Week

Popular

Archive

item