I'm using react-native-crop-image-picker to select an image on mobile. Once I have the image I save the image path - 'file:///Users/.../image-name.png'.
I need to send this image to a socket connection in base64 format. But I'm not sure how to do this. The crop-image-picker has an option to obtain the base64 string while selecting the image but due to memory constraints I can't save that and have to convert it on the go.