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);
});
imageUrl
the url of imagesize
expect size of compress (unit:kb)
data
thebase64
stringfileName
the name of image(unit:B)size
the compressed size of imageorigin
the origin url of imageoriginSize
the size of origin image (unit:B)