Skip to main content

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.

 

image79

 

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

 

image31


Then wait few seconds for the project creation.

 

image62

 

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

 

google-photo-api

 

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

 

image53


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

 

oAuth-google-drive

 

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)

 

app-credentials

 

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

 

authorized-domain

 

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

 

add-verify-domain

 

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

To finalize the integration, go back to the WordPress dashboard and click on the menu Settings > WP Media Folder > Cloud > Google Photo tab. 

Automatic mode

From now, you can save a lot of time while connecting to the Google server.  First, in order to use this feature, you have to link your Joomunited account at Menu Settings > General, please click on the WordPress settings link if you have not connected yet.

 

unconnected-google-photo

 

Then go back to the plugin Settings > WP Media Folder > Cloud > Google Photo tab and just click on Connect Google Photo button on the right corner.

 

connect-auto-google-photo

 

Then follow the next steps to finish the connection.

 

connected-auto-google-photo

 

It's so quickly, right? Yes, we know it. :) 

 

Manual mode

With the credentials in the previous step, at Google Photo tab and paste your

  • Client ID
  • Client secret

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

 

unconnect-manual-google-photo

 

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

 

google-api-permission

 

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 updated 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 it as the album title. Finally, click on Import button and a new folder will be created in the Media. 

 

import-album

 

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 feature from Google Photos is importing selected images to a folder.  Indeed, after choosing one or several images from Google Photos, click on Import Selection button. Then, select a folder and press on Import button.

 

import-selection

 

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.

 

import-selection-gallery