Expand my Community achievements bar.

How to gzip SVG files served from the DAM?

Avatar

Level 9

Dareboost is saying we should be gzipping our SVG files (from DAM). Any suggestions how we can do this, e.g. in dispatcher or OSGi files?  Its the cloud AEM version, so somewhat limited.

3 Replies

Avatar

Community Advisor

Hi @TB3dock ,

        Overlay Adobe granite HTML client Library configuration in your code and update the configuration as per the requirement.

Means enabled gzip compression so it will be apply to the all type of images.

Regards,

Sanjay

   

Avatar

Community Advisor

Hi @TB3dock 

 

You can enable mod_deflate module on your apache webserver and it will compress everything.

 

LoadModule deflate_module modules/mod_deflate.so

 

Refer the link here:

https://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/

 

For enabling gzip compression for CSS/JS, please set

htmllibmanager.gzip="{Boolean}true"

on com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl OSGi configuration as well.

 

Thanks!

Avatar

Level 9

Hi, we dont have an apache server, unfortunately, we are using the Cloud version of AEM.  I dont think we can use LoadModule.

Regarding the 

htmllibmanager.gzip="{Boolean}true"

setting - the system is already gziping some assets, its just not zipping svg files. We need a way to zip sgv files.