September 4, 2013 at 7:58 am #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 </FilesMatch> </IfModule>
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: gzipMay 15, 2019 at 4:08 am #287847
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
You must be logged in to reply to this topic.