I have an icon named "home.svg" in my assets folder. how can I direct my q-icon component to get the icon inside the assets/ directory.
I have tried applying this way:
<q-icon name="img:/assets/home.svg" class="text-dark" style="font-size: 32px;" />
but the image is not being rendered.

You want to use the default slot. And see Asset Resolving Rules.
<q-icon class="text-dark" size="lg">
<img src="~assets/home.svg" />
</q-icon>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With