Server Configuration:Apache

From Svg wiki

Apache can be configured for SVG by adding the following lines to Apache's httpd.conf file, or to a file called .htaccess in your website's root directory.

AddType image/svg+xml .svg
AddType image/svg+xml .svgz
AddEncoding gzip .svgz
<FilesMatch \.svgz$>
  <IfModule mod_gzip.c>
    mod_gzip_on No
  </IfModule>
</FilesMatch>

Using httpd.conf is prefered because it's only loaded once when Apache is started. A .htaccess file on the other hand will be parsed every time a file is downloaded from your website. This sounds prohibitive, but in fact the performance hit is negligible, and .htaccess files are widely used. If you can't convince your Web host to update the server's httpd.conf file and restart Apache, just create your own .htaccess file instead.

mod_gzip

From the above, the lines:

<FilesMatch \.svgz$>
  <IfModule mod_gzip.c>
    mod_gzip_on No
  </IfModule>
</FilesMatch>

are used to ensure that the mod_gzip module won't be invoked for files with the .svgz filename extension. If mod_gzip is installed and you don't have these lines then the line:

AddEncoding gzip .svgz

can cause an incorrectly configured mod_gzip installation (quite common) to compress all your .svgz files a second time. This will result in those files not rendering in some browsers (Mozilla Firefox for one). A symptom of this problem is that your .svgz files will be served with the header:

Content-encoding: gzip, gzip