Sling Mappings for DAM Assets
Hi All,
Is it possible to create Sling Rewrites for DAM asset paths? For instance, I'd like to rewrite the path to all images in my html.
By default the html looks like this:
<img src="/content/dam/products/shirt.jpg" />
But, I'd like to rewrite the path so it looks like this:
<img src="/assets/products/shirt.jpg" />
I've added the following rule to the Resource Resolver Factory:
/content/dam(.*)</asset$1
And included this as a Rewrite Element in the Link Checker Transformer:
img:src
But the rewrite doesn't get applied at all. I've tried editing the configurations in both via the Felix console and the repository. But, no luck. Does Sling apply to the DAM? Or is there another preferred way to achieve the same result?