WP Media Folder Addon: Google Photos Integration

1. Create a Google Photos App


The Google Photos integration with WP Media Folder is included in the Add-on. You need to install this add-on (plugin) in addition to WP Media Folder. The addon includes integration for Google Drive, Dropbox, OneDrive Personal, OneDrive Business and Amazon S3 too.

First, to use Google Photos you need a Google dev App to connect your website. Go to https://console.developers.google.com/project and create a new project.




Then setup a project name - you can provide any name you want, but do not include spaces or accents.



Then wait few seconds for the project creation.




If it's the first time you're using the Photos Library API, you'll need to activate it.




From the left menu, click on “API Manager.”



From the left menu, navigate to “Credentials” >> “New credentials” >> OAuth client ID; if asked, add a name to your OAuth consent screen.




Now, the most important step:

  • Select “Web application” and add a name of your choice
  • Authorized JavaScript origin: https://your-domain.com (replace by your domain name, with no trailing slash)
  • Authorized redirect URIs: https://your-domain.com/wp-admin/options-general.php?page=option-folder&task=wpmf&function=wpmf_google_photo_authenticated 
    (replace by your domain name)




Google has changed their policy recently, so you need to fill your Authorized domains at OAuth consent screen tab > Edit App.




Moreover, you should add your domain at Domain verification tab. Please click on Add domain button and following the instructions.




Now you can turn back to the previous step to create the credentials.

Then… voilà! You got your ID and Secret to add in WP Media Folder's configuration.

2. Login to Google Photos in WP Media Folder

Then go back in WordPress admin and click on the menu Settings > WP Media Folder > Cloud > Google Photo tab.

Now, you can paste your

  • Client ID
  • Client secret

Save the configuration and click on the Connect Google Photo button.




If you haven’t made any mistake you should validate the authorization in a new window as shown:




The connection should be a success ☺ If it is successful, you can create and manage Google Photos right from WordPress' media manager.


3. What can I do with Google Photos?

How does it work? 

In WP Media > Google Photos, you will see all your albums from your Google account. All your Google Photos albums and pictures are automatically update to your WordPress.

Import albums from Google Photos

With WP Media Folder Addon, you can import an album on Google Photos as a folder in the Media library. When you click on any albums on Google Photos, the Import Album button will appear, then just press on it. After that, select where the folder will be placed, then rename the folder or leave as album title. Finally, click on Import button and a new folder will be created in the Media. 




After importing an album from Google Photos as a folder following the steps above, you can create a gallery from that folder. Please go to Gallery from Folder in Galleries Addon documentation for more details.

Import images from Google Photos

Another main features from Google Photos is importing selected images to a folder.  Indeed, after choosing one or serveral images from Google Photos, click on Import Selection button. Then, select a folder and press on Import button.




In Media > Media Folder Galleries , when creating a new gallery, you can pick some images from Google Photos. Or add more images to the current gallery.