SwissUpLabs Logo

Image attribute filters

Create new product attribute
  1. On the Admin sidebar, tap Stores. Then under Attributes, choose Product.
  2. Create new ‘brand’ attribute.
  3. Set Catalog Input Type for Store Owner is set to “Visual Swatch.”
  4. Under Manage Swatch (values of your attribute), tap Add Swatch. Then, do the following:
    • In the Swatch column, tap the new swatch to display the menu. Then, choose Upload a file.

    Upload a File

    • Navigate to the swatch file that you prepared, and choose the file to upload.
    • Repeat these steps for each swatch image.
    • Enter the labels for the Admin and Storefront.
  5. In the Storefront Proporties, set value ‘Filtrable (with results)’ for ‘Use in Layered Navigation’ .
  6. When complete, tap Save Attribute. Then when prompted, refresh the cache.
  7. The last step is to open each product in Edit mode, and update the brand attribute with the correct swatch. To update multiple products at the same time, follow the steps below.
  8. Run bin/magento index:reindex and bin/magento cache:flush

vendor

Next up

Edit this Page