Closed Rezaramdhanisti closed 7 months ago
Support output base64. Currently, when cropping process is successful it return uri, some people maybe need base64.
My backend only support base64 for upload images.
Implement on native modules and create bridging to javascript.
ImageEditor.cropImage(image, cropData).then(data => { console.log("Cropped image base64", data.base64); })
You can always read out the file in base64 format using e.g. RNFS
react-native-fs works perfectly but it would have been awesome if I didn't have to install this package for just this feature.
you can also use react-native-blob-util file api
react-native-blob-util
Fixed in 4.0.0
4.0.0
Feature Request
Support output base64. Currently, when cropping process is successful it return uri, some people maybe need base64.
Why it is needed
My backend only support base64 for upload images.
Possible implementation
Implement on native modules and create bridging to javascript.
Code sample
ImageEditor.cropImage(image, cropData).then(data => { console.log("Cropped image base64", data.base64); })