Wednesday , 20 June 2018

How to embed Google Photos images on your website

Spread the Article
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Google Photos is the best service for backing up your digital photos in the cloud. They have no storage restrictions, you can upload images and videos, and the integrated visual search engine helps you find photos by faces or objects in the image. However, there is a feature that is still missing in Google Photos.

You can easily share your photos with anyone using a simple link, but Google Photos does not offer any option for you to insert an existing image on a website. That is, if you have already uploaded an image to Google Photos, you can not insert it directly into your website through Google Photos.

Embed Google Photos is a new web application that, as the name implies, makes it very easy for you to choose any image hosted in Google Photos and place it on a web page with a simple HTML code.

Here are the steps involved:

  • Go to photos.google.com and open any image you want to insert into your website.
  • Touch the Share icon  and then click on the Get link button to generate a link to share that image.
  • Go to j.mp/EmbedGooglePhotos, paste that link and it will instantly generate the insertion code for your selected image.

That’s. Open your website template, paste the generated code and save (see the sample). The image will now be published directly from your Google Photos account. This technique can also be used to embed images in HTML Mail without having to use an external image hosting service.

Embed Google Photos – How does it work?

When you share a single photo in Google Photos, create an unlisted link that anyone can access, including those who have not signed in to your Google accounts. Internally, the insert application downloads the page behind this link and extracts the Open Graph tags to determine the direct link of the image and the underlying photo album.

Change the height and width of the image

All images hosted within Google Photos have a URL in a particular format:

https://lh3.googleusercontent.com/xyz=w2400

The w2400 in the URL indicates that the maximum width of the image will be 2400 pixels. However, if you have a higher resolution image, you can change the width parameter to something like w8000, which means 8000 px wide. The height will be adjusted automatically to preserve the original aspect ratio.

You can also specify the height and width values in the URL and Google Photos will fit the image with the specified size.

https://lh3.googleusercontent.com/xyz=w1415-h944

The insert application only works for individual images and not for albums. One more thing. I know of no bandwidth limitation for images shared through Google Photos.

 

Leave a Reply

Your email address will not be published. Required fields are marked *