I use promise to download an image and get the image data like:
promise.downloadFile().then(function(image){ //do something }); >
promise.downloadFile().then(function(image){ //do something });
You can try this node module
https://www.npmjs.com/package/image-to-blob
or you can convert image to canvas, then convert to blob uri:
https://github.com/blueimp/JavaScript-Canvas-to-Blob