works on 7.1. Copy and paste this to CSS code for your website. Worked for me. now all images have the own correct aspect ratios without jumping thru hoops.
/*original aspect ratio for images in store*/
// code #2//
/* list page */
.products.collection-content-wrapper .grid-item .grid-image-cover {
object-fit: contain !important;
}
/* detail page */
img.ProductItem-gallery-slides-item-image {
object-fit: contain !important;
height: auto !important;
}