Stop simple product images overriding main product gallery after clicking swatches

Hi,

On a configurable product page when a swatch/attribute is selected, the product page gallery images get overridden by the simple product image for each swatch. Or there is a extra thumbnail has been added (the image which assigned to that simple product). Which presents here as a repeated thumbnail.(screenshots attached)

And on default demo, it is like:


In magento 2, is it compulsory to add the images to all simple products? otherwise it will not show the product image when selecting the swatch or attributes.

How can i just show all the thumbnails and when some swatch been selected, its pic will shows up and its thumbnail will be highlights or have a frame effect. Like the screenshot blow:

Thanks!

Hi,

“In magento 2, is it compulsory to add the images to all simple products? otherwise it will not show the product image when selecting the swatch or attributes.”

No, you don’t have to add images to all your child’s products if you don’t have them.
The image for the missing child product just won’t be shown when clicked on the swatch.

“How can i just show all the thumbnails and when some swatch been selected, its pic will shows up and its thumbnail will be highlights or have a frame effect. Like the screenshot blow:”

It is easy, just select ‘Use Product Image for Swatch in Possible’ to yes.

1 Like