Articles on: Set up

How to Create a Filter with Images

Filters with image


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


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


Give a name to the metaobject definition


  1. Add fields for your metaobject:


  • Single line text → Name it “Category name”


Add Single line field


  • File → Name it “Category image”


Add File


  • Under Accept specific file types, choose Images


Setup file field


  1. Click Save


Save metaobject


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


  1. Fill in the name and upload an image


Save entry


Example:


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


  1. Save each entry
  2. 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



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


Add product metafield definition


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



  1. 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)



  1. 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


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


Save new filter


  1. 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 and select your builder
  2. Find and open your filter step
  3. Check Enable horizonter filter and select Product category


Enable horizontal filter


  1. Save and see the result


Filters with image


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




Updated on: 28/10/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!