Mapping Image URLs in Sightly Templates (AEM 6.1)
Hi Everyone,
I'm using /etc/map rules to remove /content/appname from requests. This works properly for incoming HTTP requests.
However, image tags rendered in Sightly templates are not rewritten. For example, if I have an image component at /content/app1/en/news/image, the src attributes in the image tag is not rewritten. It's still something like
<img src="/content/app1/en/news/image.img.jpg/123456789.jpg">
I would like it to be
<img src="/en/news/image.img.jpg/123456789.jpg">
I tried adding "img:src" to the set of mappings in Link Checker Transformer but this has no effect.
I assume I can create a custom rewriter/transformer to resolve this issue but it seems like this is something that should work automatically.
Any suggestions?
Thanks in advance,
David Frenkiel