Usage:
- copy swatch images in magentoRoot/var/import/images/ directory
- edit your csv file accordingly
- modify $attributeCode and $csvFilename
- run the script in magentoRoot
Note:
- Only tested in Magento CE 2.4.1
- Only set labels for default store view
- The images better to be square, width == height
Todo:
- labels for multistore views
- clear exsiting swatches to avoid duplicated problem
- check csv format
- check image existence