Question

what I need is to hide all pics that doesn't bellongs to the selected color in swatch of configurable product, is there any way to achieve this? Thanks.

I've seen this similar question, but without any answer.

Was it helpful?

Solution

I get this using etc/view.xml file in my theme, with this configuration:

<vars module="Magento_ConfigurableProduct">
   <var name="gallery_switch_strategy">replace</var>
</vars>

The Luma Theme default value is prepend. This link brings more information.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top