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
  • 26,047
  • 12
  • 43
  • 63
RoyalBosS
  • 350
  • 3
  • 13
  • 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