I am using React Native Gifted Chat for one of my project. I am aware that there is a image option available where I can attach a single image to a chat. But, is there a way I can attach multiple images to a single chat?
Asked
Active
Viewed 758 times
5
-
any update on above? – yogesh wadhwa May 04 '22 at 08:06
1 Answers
0
from documentation, the type of image is a string. so it's meant to attach one image. but a simple solution is to do like image:"img1,img2,.." , then use
renderMessageImage={(props)=> customMessageImages(props)}
where
customMessageImages=(props:MessageImageProps<IMessage>)=>{
const imgs = props.image.split(',')
return(
{
imgs.map(img=>(
<Image source={img} />
))
}
)
}

Hemza Talha
- 79
- 1
- 3