Assign a different class/selector through CMS

So basically I’m taking inspiration from this example: Isotope + Webflow - Webflow

What I want to do is to populate the grid through a collection of images. The user will select a class/selector for each image so the gallery can utilize the filtering property. Thus each individual item/image could have a different set of classes/selectors to the other item/image.

I’ve been scrambling my head over this and thought I’d ask the lovely Webflow community if anyone could help with my predicament.

Many Thanks