Gzipping and SVG icons

Gzipping and SVG icons

by David Scotson -
Number of replies: 5
Does anyone know if it's recommended to gzip your SVG icons?

I'm getting told by Google Page Speed service that turning this on could reduce the size of the icons by half, but I don't know if it would break things.

I've already got it on for the other files in the server, but the defaults seem to miss the icons (maybe because they don't have a file extension?)
Average of ratings: -
In reply to David Scotson

Re: Gzipping and SVG icons

by Gareth J Barnard -
Piksa bilong Core developers Piksa bilong Particularly helpful Moodlers Piksa bilong Plugin developers

Would turning your icons into a font using say Inkscape make things faster?

In reply to Gareth J Barnard

Re: Gzipping and SVG icons

by David Scotson -
Probably, but this applies also to the colorful resource icons which don't have a good font alternative too.
In reply to David Scotson

Re: Gzipping and SVG icons

by Danny Wahl -

h5bp does:

https://github.com/h5bp/server-configs-apache/blob/master/.htaccess#L501

AFAIK as long as your mime-types are set correctly then the extension doesn't matter, but I don't know why a file wouldn't have an extension (other than executables)

Average of ratings:Useful (1)
In reply to Danny Wahl

Re: Gzipping and SVG icons

by Julian Ridden -

I'm with Danny. I did not think the extension itself had an impact but more how it was compressed.

Julian

In reply to Danny Wahl

Re: Gzipping and SVG icons

by David Scotson -

Thanks, that's good info.

By not having an extension I mean like:

https://moodle.org/theme/image.php/moodleofficial/mod_forum/1385121489/icon

Which the server decides whether to send as SVG or PNG (or GIF) and sets the mimetype appropriately.

It turns out our live servers already have gzip turned on for SVG anyway, it was only the test server that was set up differently. So it all seems to have been working fine for the last year or so.

cheers,

dave