Expand my Community achievements bar.

Nomination window for the Adobe Community Advisor Program, Class of 2025, is now open!
SOLVED

Adobe Aem - Rewrite Static Asset Urls

Avatar

Level 1

Hello,


I am currently working with Adobe AEM 6.5 in an on-premises environment and would like to find a way to modify the HTML of web pages to automatically replace the img:src, link:href, and script:src attributes. Specifically:

 

 

Could you please guide me on the best approach to implement this solution ?

 

Thank you in advance for your support.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@RobertoLa3 Wwelcome to AEM Experience League community. you reached perfect place to get your AEM queried answered.

 

We have exact solution already implemented by our fellow Adobe Consulting experts under ACS commons. All it takes is to install ACS commons in your instance which is compatible with your AEM version and do the configuration.

 

https://adobe-consulting-services.github.io/acs-aem-commons/features/utils-and-apis/static-reference...

View solution in original post

5 Replies

Avatar

Level 10

Hi @RobertoLa3,

can you explain the purpose of this change? Why would you use absolute links? Relative links will work well in all AEM instances, with and without CDN.

 

Daniel

Avatar

Level 7

Hi, As @konstantyn_diachenko mentioned link transformer makes the page generation very slow . I would recommend to use proxy at CDN level when any request starts with /etc.clientlibs or /content/dam to map to cdn domain instead of sending request to dispatcher.

Avatar

Correct answer by
Community Advisor

@RobertoLa3 Wwelcome to AEM Experience League community. you reached perfect place to get your AEM queried answered.

 

We have exact solution already implemented by our fellow Adobe Consulting experts under ACS commons. All it takes is to install ACS commons in your instance which is compatible with your AEM version and do the configuration.

 

https://adobe-consulting-services.github.io/acs-aem-commons/features/utils-and-apis/static-reference...