Most of the Ecommerce customers make a buying decision by viewing the product image, and that’s how image plays a vital role in boosting store sales. Because they can’t have hands-on experience until they received their order delivery. That’s why the store owners add multiple product images and videos from different perspectives so the customer can make a more precise decision and reduce product returns. In default Magento 2, there are several image type options using which you can set base Image, small Image, thumb, and open graph/twitter card images for the product.
But things are quite easy when you have a single product image, but when there are multiple images, you have to select image options each time you upload product image and also have to remember their sequence and everything. To make it easy, you can use your base image as product thumb, so you can save your time by using the same image everywhere in Magento 2. By using the base image as a thumb, the same image will be displayed in a mini cart every time your customer adds a product to the shopping cart. Here is code to do the same.
To do the same first, we need to add a small piece of code in frontend “view.xml” file inside your theme folder. But first of all search for the below code in the file.
app\design\frontend\Themes\Yourtheme\etc\view.xml
<image id="mini_cart_product_thumbnail" type="thumbnail"> <width>75</width> <height>75</height> </image>
Now replace that code with below code.
<image id="mini_cart_product_thumbnail" type="small_image"> <width>75</width> <height>75</height> </image>
Simply clear the cache and that’s it.
Lastly, if you found this blog helpful, don’t forget to share it with your colleagues and Magento Friends and Let us know if you are facing any issue while implementing this code.
Happy Coding!
Hello Magento Friends, In today’s blog, I will explain How to Add Tooltip in Checkout…
MongoDB is a popular NoSQL database that offers flexibility and scalability when handling modern web…
In NodeJS, callbacks empower developers to execute asynchronous operations like reading files, handling requests, and…
Hello Magento Friends, In today’s blog, we will learn How to Show SKU in Order…
The "Buy Now" and "Add to Cart" buttons serve as the primary call-to-action (CTA) elements…
Hello Magento Friends, In Magento 2, the checkout process allows customers to choose multiple shipping…
View Comments
thanks it work fine