vue-social-chat
vue-social-chat copied to clipboard
Avatar image
Currently, you're giving the option to insert an avatar by setting a url/path to the image.
Using nuxt, I'd like to load from my assets folder. Either by require()
or per absolute path:
data: () => ({
attendants: [
{
app: 'whatsapp',
label: 'Partner',
name: 'John Doe',
number: '1234567890',
avatar: {
src: require('@/assets/John_Doe.jpg'),
// OR
src: '@/assets/John_Doe.jpg',
alt: 'John Doe avatar'
}
}
]
})
Which results in following in the frontend:
<img src="[object Object]" alt="John Doe avatar">
resp.
<img src="~/assets/John_Doe.jpg" alt="John Doe avatar">
It looks like your plugin surpasses the assets functionality. Not a major issue, but still an issue :)
I will do some tests and submit a new version that supports it.