General Notes (🔗)
- For an overview of the layouts, see the Layouts page.
- Within Google Photos there is no provision to pass another user’s ID to see that person’s photos. The only way to see another person’s photos is if that person has shared an album with you. All photos shown on your Google Photos account will show up using Photonic.
- Working with albums on Google Photos requires you to authenticate first. Once authenticated you can use the code as documented in the following examples.
Displaying All Your Albums (🔗)
To display all your albums in Google Photos use the following syntax:
[gallery type='google' view='albums']
Here are my albums:
Filtered List of Albums (🔗)
Note that unlike Photos Google doesn’t let you filter albums by date etc. Photonic, however, lets you do this by explicitly passing album IDs via the
filter attribute. The
filter attribute is optional, wherein you only provide a comma-separated list of albums that you wish, i.e.
filter='x,y'. You can get the album ids from Photonic → Helpers. With effect from version 2.00 you will not require the “Helpers” if you use the “Add / Edit Photonic Gallery” button to insert your gallery.
[gallery type='google' view='albums' filter='abc,def,xyz']
In the above I can replace the album ids with my Scotland (
AKMhXYz2mgbcKBRmGHIi-TursTGERR2xyFLajQe-UWR3o1wQvh2G2ucGTgU3nniXgcmFd5c8FePo), Sydney (
AKMhXYxmTsxFmsIJOAI3qZ0XM_kHlTf88PMQi0N770n1ZXJQhKyhH8o4qgJMPldgyLjHZuhnHrlh) and London (
I could, alternatively, exclude the albums above and show the rest, by simply adding the
[gallery type='google' view='albums' filter='abc,def,xyz' filter_type='exclude']
Shared Albums (🔗)
Google Photos has introduced the concept of “Shared Albums”. By default all your shared albums are included in the output of Photonic. But you could use an
access parameter to show just the shared albums. The
access parameter takes the following values:
all– shows both, shared and not-shared albums
shared– only shows albums that have been shared
not-shared– only shows albums that have not been shared
The following is the usage:
[gallery type='google' view='albums' access='shared']
The above shows all my shared albums:
Conversely this will show all my “not shared albums
[gallery type='google' view='albums' access='not-shared' layout='random']
“Show More” (🔗)
Google Photos cannot return more than 50 albums in one shot, and this limit is far lower than Flickr’s, SmugMug’s, Zenfolio’s, or, surprisingly, Picasa’s. To get around this Photonic’s verion 1.68 contains a pagination capability for albums.
If you pass the
count parameter, Photonic will only show you the number of albums stipulated by that parameter. You can add an additional
more parameter to display something like a “Load More” button. The button will continue showing till the shortcode has finished pulling all your albums:
[gallery type='google' view='albums' count='3' more='Load More']
Note that Google sometimes returns less than the value specified in
count, but even in such cases the “Load More” button will continue showing up till appropriate.
“Show More” within Album (🔗)
Google Photos cannot return more than 100 photos from an album in one shot. This causes a problem for all of the above examples if an album has more than 100 photos. To get around this Photonic offers two additional shortcode attributes:
photo_more. These attributes kick in if you are displaying an overlaid panel (Photonic → Settings → Generic Options → Overlaid Popup Panel → Enable Interim Popup for Album Thumbnails, or via the
popup='show' attribute). See here for examples of the overlaid panel.
[gallery type='google' view='albums' filter='abc,def,xyz' popup='show' photo_count=10 photo_more='Load More']
Click on the Sydney album to see the pagination behaviour.
Displaying a Single Album (🔗)
Displaying a single album is handled via
view='photos' instead of
view='albums'. Correspondingly the documentation is on the Photos page.