make sure the image is in the middle