ensure that all images have the same size