const img_url = "remote-image-url";
Jimp.read(img_url, function (err, image) {
image.getBase64(Jimp.AUTO, function(data) {
console.log(data); // null
});
});
Sorry, I feel like I'm doing something wrong but cannot figure it out. Both buffer and base64 return null. The image read works because I can save it with image.write() and it will save locally.
You forgot parameter err in the function
const img_url = "remote-image-url";
Jimp.read(img_url, function (err, image) {
image.getBase64(Jimp.AUTO, function(err, data) { // Add err
console.log(data);
});
});
d'oh! Thanks @avmayorov
Most helpful comment
You forgot parameter err in the function