A modern image uploader created by using modern javascript.
(NO DEPENDENCY!!!)
- Simply download the zip and extract the file
- Copy the script file from
/dist/js/vanilla-image-uploader.js
- Core style from
/dist/css/app.css
- Theme style from
/dist/css/theme-flat.css || /dist/css/theme-round.css
- Run
npm install git+https://github.com/key60529/vanilla-image-uploader --save
- Insert the follow script to your js file which will compile and load in the page you use the uploader
import VanillaImageUploader from 'vanilla-image-uploader';
window.VanillaImageUploader = VanillaImageUploader;
In the page you need to use the uploader, insert the following script
new VanillaImageUploader({
name: 'product_image', // input field name
label: 'Upload a photo' // the text inside the button
});
Since this is the first simple library I created, you may face to any of unexpected bugs when using this uploader, please report through issue section in github, or create any pull request if needed. THANKS!!