need relative URL of adapted file when writing on file system : we add a flag to filepath2URL in case the function wants to provide absolute URL on static domain