Rajasekaran Raji
Rajasekaran Raji

Reputation: 74

How to add download image in website?

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

Answers (1)

divoom12
divoom12

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

Related Questions