use resolvePath to set image src.