SDKsReact Native
Create an image message from a file
OpenIM React Native SDK guide for create an image message from a file.
Use createImageMessageFromFullPath() to create a message from an image stored on the device.
const message = await OpenIMSDK.createImageMessageFromFullPath(imagePath);imagePath is the full path to the image on the device. The call returns a MessageItem ready to send. When you use Send a message, the SDK uploads the local resource.
Was this page helpful?