I've pulled an image from Microsoft graphQL and applied the following before storing the string in vuex.
Buffer.from(image).toString('base64')
Inside my component I'm trying to render the image in the following way
<img class="shadow avatar border-white" :src="`data:image/jpg;base64,${this.$store.state.user.profilePhoto}`"/>
I've tried adding the charset-utf-8 into the mix and a few variations including different image types including png and jpeg.
The CSS class simply rounds the image and adds a bit of shadow.
At the moment I'm getting a transparent circle and no image to be found.
Is there another way I need to encode the image before trying to render it?