Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Is there a way to rewrite urls within style html attribute using static reference rewriter?

suganyathangave
Level 1
Level 1

Hi

Is there a way to rewrite the static urls within style html attribute using ACS AEM Commons Static Reference rewriter (detailed here)?

Sample code: <div style="background-image: url('/content/dam/*****.jpg');"/>

Thanks

2 Replies
smacdonald2008
Level 10
Level 10

The docs on that page seems to indicate you can do this task.

suganyathangave
Level 1
Level 1

No, it didn't work. I tried adding div:style to the config, but it didn't rewrite the url within background-image.