How do I add Google Photos album to WordPress?

WordPress Google Photos album plugin

Yes, it’s not complicated with the help of the following WordPress plugin. No images need to be uploaded, just insert links to them.

When I created a tool to generate embed Google Photos album, I also wanted to use it on my blog. WordPress is a popular and advanced tool, so I’ve been trying to do this plugin with the following demo:

Here is a demo with Mr. Monstro photo stream included with WordPress plugin.

The principle is much simpler than my previous tool and has limited capabilities. But it uses the full “Player” feature to conveniently view photos.

How to do it?

1) First of all, install the Embed Google Photos Album plugin on your WordPress and activate it.

2) When ready, you can use the following shortcode entry. Instead of that link, use a link to your shared Google Photos album.

[embed-google-photos-album "https://photos.app.goo.gl/CSV7NDstShTUwUZq5"]

3) Save / Update post.

That is all.

How do I set plugin properties?

Shortcode supports these parameters:

  • link[string] public link of Google Photos album
  • width[int | 'auto'] set widget width in pixel or “auto” to stretch to 100%
  • height[int | 'auto'] set widget height in pixels or “auto” to stretch to 100%
  • image-width[int] image max-width in pixels, default is 1920
  • image-height[int] image max-height in pixels, default is 1080
  • slideshow-autoplay[true | false] start slideshow in normal view (currently not allowed by decorator)
  • slideshow-delay[true | false] slideshow delay in seconds, default is 5 seconds.
  • slideshow-repeat[true | false] Enable or disable repeat slideshow, delfault is true

Examples:
[embed-google-photos-album "https://photos.app.goo.gl/CSV7NDstShTUwUZq5"]

[embed-google-photos-album link="https://photos.app.goo.gl/CSV7NDstShTUwUZq5"]

[embed-google-photos-album link="https://photos.app.goo.gl/CSV7NDstShTUwUZq5" width="720" height="540"]

In some cases, it may be better to embed code generation directly into the WordPress template. Since 2.0.7 the getcode() method can be used using the following example:

<?php echo (new Pavex_embed_google_photos_album())
   -> getcode('https://photos.app.goo.gl/CSV7NDstShTUwUZq5',
      0, 480, 1920, 1080
   );
?>
How do I update my album?

The album will automatically update as soon as you save or update your post.

2 thoughts on “How do I add Google Photos album to WordPress?”

Leave a Reply

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