Base64js-ES6
Package for encoding images to base64 images and resizing base64 images 🔥
Install
npm install base64js-es6 // yarn add base64js-es6
Usage
The functions are Promise based and can be used as ES6 Modules.
Encode to base64
Example
// With <input type="file" name="files[]" onchange="ImageOnChange" /> { const file = etargetfiles; // getBase64(src of file) ;}
Resize base64
Example
// With <input type="file" name="files[]" onchange="ImageOnChange" /> { const file = etargetfiles; ;}
Contribution
Feel free to contribute to this package. If you have any questions you can reach out to me on twitter 😄
License
MIT