Promise based image loader for browser