Reducing the size of the images to improve performance