Refactor loading images from internet.