0

Adding a product where it's image is wide (landscape), gets squeezed into a portrait sized place holder.

As below.

How can I get the image to fit into the cart image placeholder and maintain its aspect ratio?

0

You can modify your mini_cart_product_thumbnail image dimensions.

YOUR_MAGENTO_THEME_DIRECTORY > etc > view.xml

<media>
    <images module="Magento_Catalog">        
        <image id="mini_cart_product_thumbnail" type="thumbnail">
            <width>75</width>
            <height>75</height>
        </image>
     </images>
</media>
  • This doesn't fix the issue of adjusting the aspect ratio to fit in image placeholder or making the image place holder dimensions dynamic to fit the images aspect ratio. – user2240778 May 18 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.