react-native-image-editor icon indicating copy to clipboard operation
react-native-image-editor copied to clipboard

Support base64 Image output not only uri

Open Rezaramdhanisti opened this issue 5 years ago • 2 comments

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); })

Rezaramdhanisti avatar Dec 14 '19 08:12 Rezaramdhanisti

You can always read out the file in base64 format using e.g. RNFS

MorelSerge avatar Apr 09 '20 14:04 MorelSerge

react-native-fs works perfectly but it would have been awesome if I didn't have to install this package for just this feature.

firofame avatar Mar 24 '22 04:03 firofame

you can also use react-native-blob-util file api

retyui avatar Nov 04 '23 21:11 retyui

Fixed in 4.0.0

retyui avatar Feb 25 '24 13:02 retyui