npm install react-native-wtfssd-imagecompress --save
react-native link react-native-wtfssd-imagecompress
import ImageCompress from 'react-native-wtfssd-imagecompress';
ImageCompress.compress(imageurl,size).then(response => {
console.log('success',response);
}).catch(e => {
console.log('error', e);
});
imageUrlthe url of imagesizeexpect size of compress (unit:kb)
datathebase64stringfileNamethe name of image(unit:B)sizethe compressed size of imageoriginthe origin url of imageoriginSizethe size of origin image (unit:B)