> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.boxiapps.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Create a Filter with Images

![Filters with image](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/filters-with-images_vlp5bl.png)

In this guide, you’ll learn how to:

* Create a metaobject definition for categories with images
* Link it to products via a product metafield
* Enable it in your Search & Discovery filters
---

**Step 1: Create a Metaobject Definition for Categories**

1. In your Shopify Admin, go to **Settings** >  **Metafields and metaobjects**

![Add metaobject definition](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/create-metaobject-definition_ab953i.png =1000x1123)

2. Scroll down to **Metaobject definitions** and click **Add definition**.
3. Enter a name, for example: Categories.

![Give a name to the metaobject definition](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/name-metaobject-definition_sruega.png =1000x693)

4. Add fields for your metaobject:

* **Single line text** → Name it “Category name”

![Add Single line field](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/add-field_12q44xk.png =1000x841)

* **File** → Name it “Category image”

![Add File](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/add-file_m4wr9c.png =1000x868)

* Under **Accept specific file types**, choose **Images**

![Setup file field](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/setup-field_1wmwzym.png =1000x956)

5. Click **Save**

![Save metaobject](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/save-metaobject-2_17qjc9.png =1000x763)

Now you have a definition that stores both a name and an image for each category.

**Step 2: Add Category Entries**

1. Inside your new Categories metaobject, click **Add entry**

![Add entry](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/add-entry-2_l0h2ke.png =1000x817)

2. Fill in the name and upload an image

![Save entry](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/save-entry_1kpw587.png =1000x456)

Example:

* Name: Sweets, Image: 🍬
* Name: Fruits, Image: 🍎
* Name: Snacks, Image: 🍪

3. **Save** each entry
4. Repeat for as many categories as you need

You now have a library of categories, each with a label and image.

**Step 3: Create a Product Metafield to Link Categories**

1. Go back to **Settings** > **Metafields and metaobjects** > **Products**

![](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/product-metafield_1qgkkks.png =1000x1123)

2. Click **Add definition** and name it (e.g. Product category)

![Add product metafield definition](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/add-product-metafield_v5r3bk.png =1000x813)

3. Under **Select type**, choose **Metaobject**
4. In the **Reference** dropdown, select the Categories metaobject you created earlier

![](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/save-product-matafield_14vdc8r.png =1000x915)

5. **Save**

This adds a new field to each product page where you can assign one of your categories.

**Step 4: Assign Categories to Products**

1. Open **Products** in your admin
2. Select a product
3. Scroll down to the **Product metafields** section
4. Find your Product category metafield and choose the category entry (e.g. Snacks)

![](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/add-entry-product-2_18xoxm4.png =1000x806)

5. Save the changes.

Repeat for each product so every item is connected to a category with an image.

**Step 5: Add the Filter in Search & Discovery**

1. Open the **Search & Discovery** app
2. Go to the **Filters** tab and click **Add filter**
3. Under **Select source**, choose your metafield (e.g. Product category)

![Find created product metafield](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/group-65-1_1sp3qrw.png =1000x649)

4. Name the filter (e.g. “Product category”)

![Save new filter](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/save-new-filter_dord9s.png =1000x624)

5. **Save**

Your store now has a category filter powered by your custom metaobject.

**Step 6: Enable Horizontal Filter in Your Boxi Builder**

1. Open the [Boxi app admin dashboard](https://admin.shopify.com/apps/boxi/app) and select your builder
2. Find and open your filter step
3. Check **Enable horizonter filter** and select Product category

![Enable horizontal filter](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/enable-filters_ck09f5.png =1000x707)

4. **Save** and see the result

![Filters with image](https://storage.crisp.chat/users/helpdesk/website/-/3/7/a/6/37a622ee17372e00/filters-with-images_vlp5bl.png =1000x1061)

 Customers can now filter products by category, and each option will display the image you uploaded.


