So I am working with download button, so I want to download image based on URL of the image. This image is not present on my website/page, I just want to download image based on it's URL. When person click on download button image, image should start download instead of redirecting to the image. I seen some answers, which says href="path/to/img", but I guess in my case I don't have path, I just have image URL. So how it possible to download image based on button click?
JsFiddle: Click Here!
Code:
<a download="https://i.imgur.com/oIzrKK3.gif" href="https://i.imgur.com/oIzrKK3.gif" title="ImageName"><img src='https://i.imgur.com/yeGaCcS.jpg'/></a>