Téléchargez des images à partir du lien http dans React
1.const download = () => {
var element = document.createElement("a");
var file = new Blob(
[
"https://timesofindia.indiatimes.com/thumb/msid-70238371,imgsize-89579,width-400,resizemode-4/70238371.jpg"
],
{ type: "image/*" }
);
element.href = URL.createObjectURL(file);
element.download = "image.jpg";
element.click();
};
2.<a href="img/me.jpg" download>
<img src="img/me.jpg"/>
</a>
//this won't download link only img from same folder
Zany Zebra