Using HTML5, you can add the download attribute to your links.
<a href="/path/to/image.png" download>
The respective browsers will then request to download the image with the same name (in this example, image.png).
If you specify a value for this attribute, this will become the new file name:
<a href="/path/to/image.png" download="AwesomeImage.png">
UPDATE: As of the spring of 2018, this is not possible for the cross origin of href s . Therefore, if you want to create <a href="https://i.imgur.com/IskAzqA.jpg" download> in a domain other than imgur.com, it will not work properly. Chrome opt-out and uninstall announcement
Richard Parnaby-King Jul 08 '13 at 13:24 2013-07-08 13:24
source share