I have specified the following attributes in my site\'s .htaccess file:
AddOutputFilterByType DEFLATE image/svg+xml
DeflateCompressionLevel 9
He
If Apache doesn't know the mime type of the file (here image/svg+xml), you need to tell it specifically (not needed in most Apaches):
AddType image/svg+xml svg svgz
Now when Apache knows about the filetype, just add this to deflate it:
AddOutputFilterByType DEFLATE image/svg+xml
For more information see https://httpd.apache.org/docs/2.4/mod/mod_deflate.html