This is mysite.xml in 'config.rewriter' folder
<?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:Folder"
contentTypes="[text/html]"
enabled="{Boolean}true"
generatorType="htmlparser"
order="{Long}1"
serializerType="htmlwriter"
transformerTypes="[linkchecker,mysite-static-refs]">
<generator-htmlparser
jcr:primaryType="nt:unstructured"
includeTags="[A,IMG,SCRIPT,LINK,SOURCE]"/>
</jcr:root>
this is the StaticReferenceRewriterTransformerFactory.cfg.json
{
"host.pattern":[
"$[env:static_domain]"
],
"attributes":[
"img:src",
"source:srcset",
"link:href",
"script:src"
],
"matchingPatterns":"[img:srcset;(\/content\/.+?[jpg|png|jpeg|svg]) .+?w]",
"host.scheme":"https",
"prefixes":[
"/etc.clientlibs",
"/etc",
"/libs",
"/content"
],
"pipeline.type":"mysite-static-refs"
}