Display SVG inside properties?

What I’m trying to do

I’m wondering if it’s possible to display SVG icons as the content of a property.

I use little cards made out of dataview tables to display things:
card

The properties of this movie’s file look like this (the “rating” property refers to the 5 stars you see above):
prop

As you can see, the “rating” property shows up as the svg files in the card, but not in the property. Is there a way to show the stars in the actual property as well?

Things I have tried

Searched through the forum and googled.

I’m not sure if you’re able to actually get the svg to “execute” when in the properties, and I’m not sure if you’re able to display pictures directly within the properties.

That being said I can think of a few alternatives to achieve your goal. You could use unicode characters, which would eliminate the need for using svg in the first place. This would then render the rating as “text” instead of an image. See https://www.namecheap.com/visual/font-generator/star-symbols/ for some symbols available. There are defined half star symbols (as seen in the link in its own section), but not every font accommodates these, so those might not properly show unless you get the correct font.

Another option is to use CSS snippets to connect to your property, and then use svg to replace the text value with the svg elements. I’ve done something similar to this, to some extent, and I’ll take a look around to see if I can find the posts or notes I made on the subject in a little while.

Yeah, I’m keeping unicode in mind as an option in case I can’t get this to work. But if you can find those posts or notes I would be very grateful! Thanks for the answer.

I’ve been doing a search, and I can’t seem to find it. And I’m starting to consider whether that was going the other way around… Some related posts I did find however are the following:

Regarding going the other way, you might want to consider having your rating as a number in the properties, and then generating an icon in the queries, as shown in the second post. Or possibly using the shortcut trick to a symbol list, as shown in the last post.


And maybe the attaching svg to the property won’t work, since it seems like it’s hard to get multiple element to appear within the values portion of the properties. I might have confused myself there, since the tags are multiple elements in the values, but I’m not sure if we can get the same kind of element generation in other properties. Sorry for the confusion.

1 Like

Oh wow, I’ll take a look through all these. Thank you sm, you’ve been very helpful!