To avoid any misunderstandings, Event Gallery will continue working. Just the usage of the Picasa API is not longer possible. It is still possible to use local images or to host your images on Amazon S3 or Flickr. And there is a new Google Photos API which can replace the Picasa API. But please read ahead :)

A couple of years ago Google started Picasa Web Albums. A great place to upload your photos and make them available on the internet. By providing an API, getting data directly from the Google servers has been possible. The API was pretty straightforward, and it was more or less comfortable to show Picasa Albums on any website. Then they introduced Google+ and Google Photos. But the Picasa Web API remained working.

2017 was a pretty busy year when it came to changes regarding the Google Photos implementation in Event Gallery. Google made mutation requests impossible. Changing the visibility of albums was no longer possible. Nevertheless, I found a user-friendly way to keep the Google Photos integration working. Event Gallery uses a dedicated application which asks you for access to your photos. With this permission, it is easy to show your images still on your Joomla website. It was even more comfortable than before. A month ago I found an excellent way to support Google brand accounts, too. I thought that this is finally perfectly working.

Starting in 2019 there will be new changes. This time the Picasa Web API gets shut down completely. No workarounds are possible. Does that mean you can't show your Google Photos on your Joomla website anymore? Maybe.

While shutting down the old API, they published a new one. The Google Photos API. Awesome, I thought. Modern API design, no longer parsing XML, just JSON data. Great! I started implementing the new API. Getting the albums, obtaining the images. Worked. So why is the "maybe" then? There is no free lunch. Google added some limitations to this API. From my perspective, they are pretty restrictive.

Let me explain how Event Gallery used the API before. To be able to show any albums on your site, requests to Google are made by a server to server communication. Special access tokens are necessary to retrieve data. My server hosts an application which deals with that. You don't need to create such an app yourself. The only thing you need to do is granting that application access to your photos. Once that access token is retrieved, your server can now talk directly to Google. Every request requires time. To avoid spending too much time talking to Google, the responses are cached for an amount of time. That includes some metadata about the albums and images as well as some URLs to thumbnails.

Where come the new API restrictions into play? Without anything doing anything else, the application using the Google Photos API has just 10.000 requests per day. That sounds a lot. But if I want to pipe all that through my hosted application, the limits are quickly reached. The solution is simple: you need to create your individual application. That is quite easy, and with a little help, everybody can do it. So far, so good.

Every Google Photos API response contains information about thumbnails. Do you remember the caching strategy I mentioned above? By default, the cache lifetime is 24 hours. But the thumbnail information in the API responses is only valid for up to 60 minutes. So I would need to decrease the cache lifetime to 60 minutes. Unfortunately, this will not work. The thumbnail download happens in the browser of your site's visitors. They need additional time. So the cache lifetime could go down to 30 minutes, right? I guess not. For a reason, I had failed thumbnails even within this time. So caching might be off the table.

Do you remember the API request limit? If you have a site showing a list of 100 albums, 100 requests are necessary to display the cover images of those albums. Every album page would need an additional request. Do you use modules showing images? That will increase the API usage even more. In the end, 10.000 does not sound that much anymore, right?

To sum up my findings so far: Picasa Web API is dead, Google Photos API is hard to use. I'm currently searching for ideas on how to work around the API limitations. I'll keep you posted.

Google Photos API
Picasa Web API

Update 2018/10/12

I might have found a way to use the new Google Photos API. Still I'm worried about the API limitations. But check out this video:

This video shows the setup of Event Gallery to get started.

This new feature will be part of Event Gallery 3.9.8. Users with a valid subscription can already download the copy I used for this video here: https://www.svenbluege.de/joomla-event-gallery/eventgallery-download/event-gallery-bleeding 3.9.7 is the version I'm working on.