But it seems I can only embed the whole album or add some filter for the photos. There is no way to manually select photos.
Will it be considered into next improvement?
Not unless Google gives a way to do it via its API.
There is a good technical reason for this. Let’s say that you have 2000 photos in Google Photos, and you select photo numbers 63, 267, 824, 1189 and 1610. The challenge is that when you call the photos API, it does not let you search by ID, and it can only pull a maximum of 100 photos at a time. So this is how the program will work:
- Once I get the first 100 photos, I have to go through each one to find a match. I match #63, then continue and try to match the remaining 37 (and not find any matches).
- Then I will have to pull photos 101-200, then try matching them. I will find no matches.
- Then I will pull 201-300 and try the same thing. I will get a match for #267. I will have to continue this way.
The above is very resource intensive, as I will have to make 17 calls to Google to keep getting the photos, and then I will have to go through each record returned to see if I can find a match. This will make the program extremely slow and add several seconds of processing time to your page.
For this reason I leave tasks like filtering / searching on the API, as in those cases the data provider itself takes care of giving you just the matches. Currently Google’s API just has what I have included – date filters and content filters.