How to gzip SVG files served from the DAM? | Community
Skip to main content
Level 8
October 21, 2021

How to gzip SVG files served from the DAM?

  • October 21, 2021
  • 2 replies
  • 1286 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Sanjay_Bangar
Community Advisor
Community Advisor
October 21, 2021

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

   

Asutosh_Jena_
Community Advisor
Community Advisor
October 22, 2021

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!

TB3dockAuthor
Level 8
October 26, 2021

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.