adjust size of the image box