I have a simple app that fetches images from Unsplash API. I would like users to click on the image, and download it and also maybe for the image to open in a new tab too. The urls.regular is just a simple url like https://images.unsplash.com/photo-1543332164-6e82f355badc?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjE3OTUzOH0
After reading other issues on stackoverflow, I added "download" at the end of my a tag.
<div>
<a href={urls.regular} title={description} download>
<img
src={urls.regular}
/>
</a>
</div>
I have also tried the following in my a tag:
href={urls.regular}
target="_blank"
rel="noopener noreferrer"
download={urls.regular}