How To

Solved: Magento 2 Show Double Thumbnail Image When Select Configurable Products

Hello Magento Pals ?,

This technical blog fixes the problem of Show Double Thumbnail Image When Select Configurable Products in Magento 2. Previously I shared How to Add Custom Layout Dropdown on CMS Page after Magento 2.3.4. Let’s look at the issue elaborately and solve it ?

Magento 2 supports different product types to bifurcate wide range of products accordingly. One of the product types is a configurable product, that provides options like color, size, etc. The options contain separate SKUs. Let us find out the problem with configurable products in Magento 2.

Problem:

Configurable products are added from the admin panel and the images are allocated to each option. Within the product page in the frontend, it shows thumbnails of different images of the product. But as the other option is selected like color or size, it shows repeated thumbnails. This affects the user experience of your store. Thus, the below-mentioned solution will help to overcome this issue.

Solved: Magento 2 Show Double Thumbnail Image When Select Configurable Products

Step 1: Go to the following path

app\design\frontend\Themes\Yourtheme\etc\view.xml

Step 2: Find below code

<vars module="Magento_ConfigurableProduct">

    <var name="gallery_switch_strategy">prepend</var>

</vars>

Replace it with below code :

<vars module="Magento_ConfigurableProduct">

    <var name="gallery_switch_strategy">replace</var>

</vars>

That is it.

Conclusion:

Hence, with the above solution, manage your configurable products’ thumbnails in Magento 2 store. In case of any doubts, you can ask me in the comment part. Also, do share the solution with your Magento friends. See you next time. Until then stay connected for more such solutions.

Happy Fixing ?

Click to rate this post!
[Total: 6 Average: 5]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate 🎖️ Certified Magento Developer👨‍💻. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.🏏

View Comments

Recent Posts

Magento 2: Add Quantity Increment and Decrement on Category Page

Hello Magento Friends, In this blog, we will discuss about adding quantity increment and decrement…

19 hours ago

How to Integrate ChatGPT with Laravel Application?

In this guide, we'll explore how to integrate ChatGPT, an AI-powered chatbot, with a Laravel…

4 days ago

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

6 days ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

6 days ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

7 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

1 week ago