I have to make an image blob object like this :
Now I can get the image base64 url in react native which I store in a variable :
const base64 = img.data;
I've tried this way but didn't work :
function b64toBlob(dataURI) {
var byteString = atob(dataURI.split(',')[1]);
var ab = new ArrayBuffer(byteString.length);
var ia = new Uint8Array(ab);
for (var i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i);
}
return new Blob([ab], {type: 'image/jpeg'});
}
const blob = b64toBlob(base64);
console.log(blob);
const base64 = img.data;
Now How can I create a blob object just like the image above with this base64 variable in react native ?

