Why Magento2 is showing the Main products(Configured products) image in child product while choosing the option from the products details page. I don't want to show the main product image in the child image on option selection as shown in the screenshot. In the first screenshot, I have marked the configured product with the red color arrow. enter image description here

In the second screenshot you can see after option selection there are two images one is from a child product which is a simple product image and the other one is the main product image. Hence I want to eliminate that main product image after the option is selected. enter image description here

2 Answers 2


Have you tried to select "Hide from Product Page"

enter image description here

Don't forget to clear Magento cache after the change is made.

  • Hi I tried but placeholder image is showing i want to eliminate it completely Aug 24, 2021 at 14:13

If someone else searches it.

The Luma Theme default value is prepend.

Replace “prepend” with “replace” for gallery_switch_strategy

For that move to the below path app\design\frontend\Themes\Yourtheme\etc\view.xml

Then, modify the code as follows

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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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