user12165978
user12165978

Reputation:

How can I link to a image in google photos but download the file instead of opening it

I've realised that there are many ways to get a file saved on your computer or server root to download but I can not find a way on how to do it to a specific image in a google photos album.

<div class="the-content">
  <p><img class="b-lazy" id="portrait" src="https://image from google photos"  align="" width="300" height="103000" alt="about">
  <a href="https://photos.google.com/SAME IMAGE FROM GOOGLE PHOTOS ALBUM">
  <button>GET</button>

Upvotes: 1

Views: 458

Answers (1)

Sydney Y
Sydney Y

Reputation: 3152

Using the a element's download attribute should do what you're asking.

<a href="https://google.com/image/image.jpg" download>Download image.jpg</a>
or
<a href="https://google.com/image/image.jpg" download="rooster.jpg">Download image.jpg with the name rooster.jpg</a>

https://www.w3schools.com/tags/att_a_download.asp

Upvotes: 1

Related Questions