Comination of axios and sharp did the trick:
const axios= require('axios'); const Sharp = require('sharp'); async function convert( url) { try { const imageResponse = await axios({url: url, responseType: 'arraybuffer'}); const imageBuffer = Buffer.from(imageResponse.data, 'binary'); const src = new Sharp(imageBuffer); await src.png(); const buffer = await src.toBuffer(); return buffer.toString('base64'); } catch (e) { console.log(e); } }general forum
-
This topic is deleted!
• reshmajacob93 -
This topic is deleted!
• reshmajacob93 -
This topic is deleted!
• Django2021