The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other SVG not being GZipped

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #149009


    I’m using the following code in my .htaccess to enable GZIP file compression. It seems to properly compress all files, except SVG. Has anyone experienced this before? Is there a solution i seem to be overlooking?

    <IfModule mod_deflate.c>
        <FilesMatch "\.(ico|pdf|svg|js|css|ttf|eot|woff)$">
            SetOutputFilter DEFLATE


    I’ve added this additional bit to make sure the MIME types are correct for svg files. For whatever reason…it still fails to gzip.

    AddType image/svg+xml svg
    AddType image/svg+xml svgz
    Content-Encoding: gzip

    Hello, When you view an SVG file in CPanel the type of the image is

    Normal SVG: image/x-generic
    GZipped SVG: package/x-generic try adding these types.

    if this does not work try
    AddType image/svg+xml svg.gz Hope one of these helps.

    Try both of these in your code and see if this works
    I have just GZipped all my svg icons and I can’t seem to get any of them to display with any of the various settings or code I have tried.
    Are your displaying properly? From Tao

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Other’ is closed to new topics and replies.