In gifted chat, there is a image field which can be a URL pointing to a image for display. Here is a message example:
{
_id: 30,
createdAt: new Date(),
image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Paris_-_Eiffelturm_und_Marsfeld2.jpg/280px-Paris_-_Eiffelturm_und_Marsfeld2.jpg',
user: {
_id: 2,
name: 'React Native',
},
},
For a image file stored in a variable img, how can I display it in a chat message? message.image = img did not work.