vue-social-chat icon indicating copy to clipboard operation
vue-social-chat copied to clipboard

Avatar image

Open matibaski opened this issue 4 years ago • 1 comments

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 :)

matibaski avatar Mar 01 '21 01:03 matibaski

I will do some tests and submit a new version that supports it.

ktquez avatar Mar 22 '21 07:03 ktquez