Image ratio is to be maintained

When the images are displayed as a rectangle or circle, the image ratio is to be maintained.