How to convert image URI to Byte[](Byte array) in React Native

Viewed 899

I need to upload image to server. The server require image in byte array. I'm using react-native-image-picker to select image from device. It returns URI(image path), which I need to convert to byte Array. Is there any way to image path to byte array?

1 Answers

react-native-image-picker provides option for base64 string. Set includeBase64 prop to true. You will get base64 encoded string in response.

Related