convert image url to base64 javascript without canvas
// There are no possible ways of doing this on client side but if you are
// using Node.js try:
let a = Buffer.from('JavaScript').toString('base64');
console.log(a);
let b = Buffer.from(a, 'base64').toString();
console.log(b);