update size of image