added dynamic base link in index.html and better image error handling