In order to optimize your newly added Google Drive images with ShortPixel, you currently need to be invited to use the ShortPixel Zapier app. Here’s the link for the invitation.
After you receive the invitation, you can create the integration by following the steps as shown in the image below. You also need to make sure that you make the Google Drive folder public so that ShortPixel can access the URL of the image.
- Step #1: Select the app “Google Drive” and the Trigger Event “New File in Folder“.
- Sign in to your Google Drive account.
- Select the folder you want to monitor for files.
- Step #2: Click on the ‘+’ icon right after step #1.
- Add a new “Filter” and fill in the fields so the zap only continues if the “Mime Type” contains
image/
. - Step #3: The third step is to configure ShortPixel. Select “SHORTPIXEL” and “Optimize Image” as shown in the image below.
-
Select your ShortPixel account
- And now you need to put ShortPixel to work! 🙂 In the Customize Image section, select the following:
- File: Choose “Web Content Link” from step #1.
- Compression Level: Choose accordingly.
- Choose whether you want to convert CMYK to RGB. If you are unsure, select “True”.
- Choose whether you want to keep the EXIF information. If you are unsure, select “False”.
- Choose whether you want to resize your image. “Outer” means Cover and “Inner” means Contain. Learn more here.
- If relevant, choose the width of the resize in pixels.
- If relevant, choose the height of the resize in pixels.
- Step #4: Locate the file in Google Drive using the “Find file” action.
-
Select your Google account.
- In the Customize File section,
- File Name: select the “Title” value from step #1 (New File in Folder in Google Drive).
- Folder: select the previous folder on step #1 (New File in Folder in Google Drive).
- File Types: choose “Images (any format)”.
- Step #5: replace the file using Google Drive’s “Replace File“:
- Select your Google account again.
- In the “Customize Replace File” section you need to fill in the following fields:
- Folder: Select the previous folder from step #1 (New File in Folder in Google Drive).
- File To Replace: Choose “Custom” and then “ID” from step #4.
- File: Choose the “File” field from step #3.
- File Name: Use “Title” from step #1 (New File in Folder in Google Drive).
- File Extension: Use “File Extension” from step #1 (New File in Folder in Google Drive).
That’s it. Now you can add files to your Google Drive folder and they will be optimized with ShortPixel! To optimize your existing images, you will need to move them back and forth to hit the Google Drive trigger, since Google Drive does not have a list feature yet.