How to Create a Filter with Images

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
- In your Shopify Admin, go to Settings > Metafields and metaobjects

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

- Add fields for your metaobject:
- Single line text → Name it “Category name”

- File → Name it “Category image”

- Under Accept specific file types, choose Images

- Click Save

Now you have a definition that stores both a name and an image for each category.
Step 2: Add Category Entries
- Inside your new Categories metaobject, click Add entry

- Fill in the name and upload an image

Example:
- Name: Sweets, Image: 🍬
- Name: Fruits, Image: 🍎
- Name: Snacks, Image: 🍪
- Save each entry
- 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
- Go back to Settings > Metafields and metaobjects > Products

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

- Under Select type, choose Metaobject
- In the Reference dropdown, select the Categories metaobject you created earlier

- Save
This adds a new field to each product page where you can assign one of your categories.
Step 4: Assign Categories to Products
- Open Products in your admin
- Select a product
- Scroll down to the Product metafields section
- Find your Product category metafield and choose the category entry (e.g. Snacks)

- 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
- Open the Search & Discovery app
- Go to the Filters tab and click Add filter
- Under Select source, choose your metafield (e.g. Product category)

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

- Save
Your store now has a category filter powered by your custom metaobject.
Step 6: Enable Horizontal Filter in Your Boxi Builder
- Open the Boxi app admin dashboard and select your builder
- Find and open your filter step
- Check Enable horizonter filter and select Product category

- Save and see the result

Customers can now filter products by category, and each option will display the image you uploaded.
Updated on: 28/10/2025
Thank you!