I want to add an image stored in my Google Photos. How can I get the direct link to an image in my Google Photos? The links I copied are not direct.
At this time Google actively changes its image service behavior. Now, there is not any algorithms how to receive direct and permanent links to your shared photos. The URLs are received by the right-button click, like
https://lh3.googleusercontent.com/(LONGLONGCODE...)=w800-h600-no, are temporary and live one-two days and then will be closed.
You can try new Google service - Google Archive Album. This service was created as holder for albums from the deleted Picasa service. But it contains photos and albums from Google Photo too. The Google Archive Album have two greats advantages:
- links are much shorter the from those of Google Photos,
- this links are permanent!
For working with Google Archive Album you need to follow rules:
- create standard (NOT PUBLIC) album in Google Photos.
- go to Google Archive Album and make sure that you see the new album.
- add to album required photos and only now change its type to the public by creating the shared link to it.
- again go to Google Archive Album, open your album.
- click on first photo.
- right-clink on photo image and copy link to the clipboard.
- insert received link where you need.
- repeat steps 5-7 for others photos.
But how long time Google Archive Album will working I don't know :(
P.S.: If you don't know - URL links from Google Photos and Google Archive Album can be tuned. For detail reads the special site.
- open photos.google.com
- open album
- open any image (black layout will appear)
- right click mouse button on image
- copy image URL
URL should look like
Or, right click mouse button - open image with new tab. Then copy image URL from your browser address bar.
As mentioned by 23W, the long URL you get by copying the image URL of any given photo in Google Photos while logged in to your Google account is "secret" and may be short lived and may stop working after a few days (though many people have reported that this is not in fact the case).
The trick is to copy the image URL while in an incognito window:
- Add the photo to a shared album if you haven't yet (if it's already in a shared album you can use the existing)
- Copy the "Link to share" (should be
- Open a new incognito window and paste the link
- Navigate to your photo and copy the image URL (should be
https://lh3.googleusercontent.com/<140 character hash>=<size info>)
You now have a deep link to the image that will not expire.
Note that when logged in you will get a "secret" image URL also starting with
https://lh3.googleusercontent.com, however followed by a much longer 755 character hash. Do not use this URL as it may expire.
Also note that you can customize the
=<size info> to get any resolution you want.
You can also install the Google Photos Direct Link Chrome extension to simplify the process.
I developed a very simple Chrome extension, called "Google Photos Direct Link". This Chrome extension is a helper to obtain a valid direct link (with .jpg file extension). Is possible to configure the desired image size too.
Another option is to use Blogger to get the URL for an image from Google Photos.
You need to add the photo to an album, and then edit a blog-post and add the image to it. Then you can look at the HTML code behind the blog-post, and get the URL from that. (You don't actually need to publish the blog post, just use the post-editor to get the code.)
Follow these steps if you want a direct link to a single image in the context of a Google Photos album. This link will allow the user to navigate to other photos in the album.
- Create an album in Google Photos.
- Create a sharing link for the album.
- Navigate to the photo you wish to link to. The URL in the address bar is the direct link.
I had some good results using the "export" function of Google Drive:
It's useful to embed resources.
Edit1: of course the image must be public
Edit2: here are some explanation:
1/ Upload the image in your GDrive
2/ Got to
Get a shareable link.
3/ See the link that just appears ? It should be something like
4/ Now the you have the FileId and your file is available via a link, You can click on
Done. The direct link to your picture will be
5/ As far as I know, you can use this link as attributes
<img src="https://drive.google.com/uc?export=view&id=0Bx7WIDEbAmAqOXpDdFM5VkNUZHM"/> gives:
Some more info (a bit off topic): The export function of GDrive seems -to say the least- not well documented, but it can use to convert on the fly lots of format, the main use is to export GDoc to PDF.