Change the size of the swatch image
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>
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
- change view.xml
- refresh magento's cache
- run php bin/magento catalog:images:resize
- flush browser's cache
- check the css which wraps the swatch images
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange