Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node.js - How do I convert an image to a base64-encoded data URL

var fs = require('fs');

var imageAsBase64 = fs.readFileSync('./your-image.png', 'base64');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #I #convert #image #data #URL
ADD COMMENT
Topic
Name
5+9 =