1

<a download="temp.jpg" href="https://codedecoder.pythonanywhere.com/media/embed/2021/10/07/temp.jpg">
  <img loading="lazy" src="https://codedecoder.pythonanywhere.com/media/embed/2021/10/07/temp.jpg">
</a>

When i click above element it takes to another site (a.href) rather than downloading the image

What should i add/remove ?

Jeremy Thille
  • 25,196
  • 9
  • 41
  • 59
RoyalBosS
  • 172
  • 8
  • 3
    The `download` attribute only works for same-origin URLs, you can not use it to trigger a download of resources from different origins. – CBroe Oct 08 '21 at 11:13

0 Answers0