I tried to the following function but it only allows me download 1 photo,
so I am finding a method to zip the images and download it.
But I have searched lots of post in stackoverflow and cannot find a correct way to do it.
function downloadPhotos() {
let files = [{
image: "abc.com/image/01"
}, {
image: "abc.com/image/02"
}]
files.map(file => {
const link = document.createElement('a');
link.href = file.image;
link.setAttribute('download', `sample`)
document.body.appendChild(link);
link.click();
link.parentNode.removeChild(link);
})
}