I am new to magento2, I couldn't understand How image swapping works for configurable product in magento 2. How this feature implemented programatically while we change options of configurable product.

  • 1
    Welcome to Magento SE. As it stands the question is not quite clear What exactly do you want to know? Do you want to understand how the feature works? If so, it is a bit too broad to answer. Or are you trying to actually implement or change something on your own? If so, what? And what do you already have? Please update the question with more details. – Fabian Schmengler Aug 2 '16 at 15:53

The thumbnail image in the shopping cart can be set to display the image from the configurable product record, or from the associated product.

ie: each select option or swatch is an associated Product. This can have a different image (or any other attribute) to the configurable product they are associated to.

Please read the official documentation: http://docs.magento.com/m2/ce/user_guide/catalog/product-create-configurable.html

|improve this answer|||||
  • What about category pages. Shouldn't product image change depending on variations available? It's a must when configurable product has 2 attributes – Gediminas Aug 22 '17 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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