Skip to main content

Forums

This topic contains 1 reply, has 2 voices, and was last updated by  MistaKistHur 5 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #149009

    Rugg
    Participant

    Hi,

    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
        </FilesMatch>
    </IfModule>
    

    EDIT:

    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
    
    #287847

    MistaKistHur
    Participant

    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)

You must be logged in to reply to this topic.

icon-link icon-logo-star icon-search icon-star