How do I make IIS compress .svg files?
compression, gzip, iis, optimization
Solution
@Dominique Alexandre points to a solution that shows how you can edit the applicationHost.config file, which works just fine.
I just wanted to add how you can do this using the IIS Manager GUI.
Go to IIS Manager > YOUR_SERVER > Under Management section > Configuration Editor > Expand the system.webServer > httpCompression > dynamicTypes
And then add the mime types you want to be compressed additionally.
Problem
I'm trying to acomplish this in web.config: ``` <staticContent> <mimeMap fileExtension=".svg" mimeType="image/svg+xml" /> </staticContent> <httpCompression> <staticTypes> <add mimeType="image/svg+xml" enabled="true"/> </staticTypes> </httpCompression> <urlCompression doStaticCompression="true" doDynamicCompression="true"/> ``` But `Content-Encoding: gzip` never appears in response headers. Though, compression works good for other types like CSS.