// html // async function imagesSelected(event) { let files = [...event.target.files]; let images = await Promise.all(files.map(f=>{return readAsDataURL(f)})); //all images' base64encoded data will be available as array in images } function readAsDataURL(file) { return new Promise((resolve, reject)=>{ let fileReader = new FileReader(); fileReader.onload = function(){ return resolve({data:fileReader.result, name:file.name, size: file.size, type: file.type}); } fileReader.readAsDataURL(file); }) }