BugFix in url resolve

Fix a problem in the uri:
if the base url is like http://site.com/folder/public/…/
the image url is relative to http://site.com/ and result in a 404 not
found.