Hi
I want to give a download button in my web page and when any one click on download button the image download to their computer. How i can do this please tell me?

currently i m doing <a href='images/3.png'>Download</a> it open the image in new tab but i want to download the image.

Thanks

You will need something on the server to send a Content-Disposition header to set the file as an attachment, compress the images as zip files so the browser cant open it in another window.

What web server application are you running this website on? Apache, IIS?

apache and right now its on my pc localhost if you have code or any link please give me thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.