Mapping adaptive image to different domain.
I would like to map images to subdomain, so path to resource
/content/sitename/en/homepage/_jcr_content/par/adaptiveimage.img.full.high.jpg/1389935334441.jpg
would be rewritten by ResourceResolver to smth like this
static.domain/homepage/_jcr_content/par/adaptiveimage.img.full.high.jpg/1389935334441.jpg
When I try the simplest (not even trying to use regex to catch all requests to images) scenario by configuring ResourceResolver like this:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:Mapping"
sling:internalRedirect="[/content/site/en,/]"
sling:match="http://static.domain"/>
I can see that all of the links used on the page are rewritten correctly (), but references in adaptive image component markup remain the same, e.g.
---
<div data-picture data-alt=''>
<div data-src='/content/site/en/homepage/jcr:content/par/adaptiveimage.img.320.low.jpg/1389935334441.jpg' data-media="(min-width: 1px)"></div>
<div data-src='/content/site/en/homepage/jcr:content/par/adaptiveimage.img.320.medium.jpg/1389935334441.jpg' data-media="(min-width: 320px)"></div>
<div data-src='/content/site/en/homepage/jcr:content/par/adaptiveimage.img.480.medium.jpg/1389935334441.jpg' data-media="(min-width: 321px)"></div>
<div data-src='/content/site/en/homepage/jcr:content/par/adaptiveimage.img.476.high.jpg/1389935334441.jpg' data-media="(min-width: 481px)"></div>
<div data-src='/content/site/en/homepage/jcr:content/par/adaptiveimage.img.620.high.jpg/1389935334441.jpg' data-media="(min-width: 769px)"></div>
<div data-src='/content/site/en/homepage/jcr:content/par/adaptiveimage.img.full.high.jpg/1389935334441.jpg' data-media="(min-width: 1025px)"></div>
<noscript>
<img src='/content/site/en/homepage/_jcr_content/par/adaptiveimage.img.320.low.jpg/1389935334441.jpg' alt=''>
</noscript>
</div>
---
Even if I try to use image path in a link field, say - /content/site/en/homepage/jcr:content/par/adaptiveimage.img.full.high.jpg/1389935334441.jpg. The link appears but still not rewritten according to the mapping.
Any ideas?