Share feedback, ideas and get community help

Updated 10 months ago

How to "Force Download" image (instead of open in tab)?

At a glance

The community member has a button that opens a JPEG image, but they would like it to download the image to the user's device instead. They provide an example of how to achieve this in HTML using the download attribute. In the comments, another community member suggests a related GitHub issue, but there is no explicitly marked answer to the original question.

Useful resources
I have a button that opens a Jpeg image but I would like it to download it to the users device instead. Is there any way to do this?
In html I would do something like this:
<a href="mysite.com/image.jpg" download>Download</a>
Add a reply
Sign up and join the conversation on Discord