@oskarsh yes, store it as a base64 string and then use it as background-image property. This is demonstrated here:
Link Preview Image HISE | UI Components | SliderThe knob / slider element can be used to set values with dragging.
favicon(docs.hise.dev)
(scroll down to the next code example).
You can of course hardcode the base64 path directly into CSS if it's not dynamic so for static icons I would prefer this.