How to send compressed (deflated) SVG via Apache2?

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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)