Adobe Aem - Rewrite Static Asset Urls | Community
Skip to main content
robertol6836527
New Participant
December 17, 2024
Solved

Adobe Aem - Rewrite Static Asset Urls

  • December 17, 2024
  • 5 replies
  • 1019 views

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.

Best answer by Shashi_Mulugu

@robertol6836527 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-rewriter/index.html

5 replies

Tethich
New Participant
December 18, 2024
Shashi_Mulugu
Shashi_MuluguAccepted solution
New Participant
December 18, 2024

@robertol6836527 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-rewriter/index.html

narendiran_ravi
New Participant
December 18, 2024

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.

konstantyn_diachenko
New Participant
December 18, 2024
Kostiantyn DiachenkoCheck out AEM VLT Intellij plugin
daniel-strmecki
New Participant
December 17, 2024

Hi @robertol6836527,

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