Question

I'm looking to change the size of the default swatch thumb in the layered navigation.

I've tried changing the view.xml from the theme and running:

php bin/magento catalog:images:resize

The command is successful but no image sizes change.

This is the main post I've looked at.

In view.xml I have:

    <image id="swatch_image" type="swatch_image">
         <width>120</width>
         <height>90</height>
    </image>
Was it helpful?

Solution

Not sure how you changed the values for swatch size but inside your view.xml file following needs adding:

<image id="swatch_image" type="swatch_image">
             <width>50</width>
             <height>50</height>
</image>

Adjust height and run php bin/magento catalog:images:resize

OTHER TIPS

  1. change view.xml
  2. refresh magento's cache
  3. run php bin/magento catalog:images:resize
  4. flush browser's cache
  5. check the css which wraps the swatch images
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top