[Answer]-Adding dynamically a property to a class in HTML

1👍

You are missing the url() around the image URL.

<span class="img_icon icon" style="background-image: url({% static blurb.icon %})"></span>

should work (if blurb.icon is a URL of course, if it is a ImageField value, you must use blurb.icon.url).

👤aumo

Leave a comment