NuxtN
Nuxt2y ago
4 replies
Wazbat

Displaying an svg in an avatar using nuxt ui

Heyo! I'm trying to display an svg with a nuxt-ui component, however I'm unsure how to exactly use this

The library I'm using, dicebear, give me an svg html, functions to generate a png or jpeg, a data uri, etc
I've tried just piping the svg html into the avatar src but that doesn't work as it expects a url
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 5 5" fill="none" shape-rendering="crispEdges"><metadata xmlns:rd....

How should I best display this?
https://ui.nuxt.com/components/avatar#props
Nuxt UI
Display an image that represents a resource or a group of resources.
Avatar - Nuxt UI
Was this page helpful?