Optimize Google Drive images using Zapier and the ShortPixel App

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 having the steps like in the image below. You also need to make sure that you make the Google Drive folder public, in order for ShortPixel to be able to access the image's URL.

  1. Step #1: Select Google Drive's "New File in Folder" trigger.

  2. Sign in to your Google Drive account.

  3. Select the folder to monitor for files.

  4. Step #2: Click on the '+' icon right after step #1.

  5. Add a new "Filter" and fill in the fields so the zap only continues if the "Mime Type" contains "image/"

  6. Step #3: The third step is to configure ShortPixel. Choose "SHORTPIXEL" and "Optimize Image", as in the image below.

  7. Select your ShortPixel account

  8. And now you need to put ShortPixel to work! :-) On the Customize Image section, choose the following:
    1. File: Choose "Web Content Link" from step #1.
    2. Compression Level: Choose according to this.
    3. Choose if you want to convert CMYK to RGB. If unsure, select "True"
    4. Choose if you want to keep the EXIF information. If unsure, select "False"
    5. Choose if you want to resize your image. Outer = Cover & Inner = Contain. Learn more here.
    6. If relevant, choose the resize width in pixels
    7. If relevant, choose the resize height in pixels
  9. Step #4: Find the file in Google Drive using the "Find file" action

  10. Choose your Google account.

  11. On the Customize File section, 
    1. File Name: choose the "Title" value from the step #1 (New File in Folder in Google Drive).
    2. Folder: choose the previous folder on step #1 (New File in Folder in Google Drive).
    3. File Types: choose "Images (any format)".
  12. Step #5: replace the file using Google Drive's "Replace File":

  13. Choose again your Google account.
  14. On the Customize Replace File section you need to fill in the following fields:
    1. Folder: Choose the previous folder on step #1 (New File in Folder in Google Drive).
    2. File To Replace: Choose "Custom", and then "ID" of step #4.
    3. File: Choose "File" field from step #3.
    4. File Name: Use "Title" from step #1 (New File in Folder in Google Drive).
    5. File Extension: Use "File Extension" from step #1 (New File in Folder in Google Drive).

That's all, now you can add files inside your Google Drive folder and they will be optimized with ShortPixel! In order to optimize your already present images, as a workaround you will need to move them back and forth, in order to fire the Google Drive's trigger, as Google Drive hasn't got a list feature yet.

Still need help? Contact Us Contact Us