improved performance of image loading