Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

How can I send image in react-native-gifted-chat?

I want to send image in react-Native-Gifted-chat like sending text. I am novice in react-native.

I have already used react-native-image-picker for pick a image from physical device, now I am unable to render image in message[].


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can call the onSend method of GiftedChat with an object as a parameter. Just pass an object with image as key. For example

onSend({ image: "https://picsum.photos/id/237/200/300" });

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...