diff --git a/src/node/index.js b/src/node/index.js index f05dbc4a2..575c18dc2 100644 --- a/src/node/index.js +++ b/src/node/index.js @@ -34,7 +34,8 @@ const loadImage = (image) => { }) .then(resp => resp.data); } - return readFile(image); + if (Buffer.isBuffer( image) ) return new Promise(function(resolve, reject) { resolve(image); }); + else return readFile(image); }; /*