Reputation: 74
I am trying to put a image in my website for Download. I am link the image url directly.
<a href="http://example.com/downloads/brand-logo.png">Click Here to Download</a>
The image is open in browser. I need if click the image link that will be download to system?
Upvotes: 1
Views: 496
Reputation: 812
Change it to this:
<a href="http://example.com/downloads/brand-logo.png" download>Click Here to Download</a>
Adding the download
attribute to an anchor tag, downloads the file from the href
attribute
Upvotes: 4