Optimise images uploaded to GDrive

For Google Drive, automatically optimizes images uploaded to a designated folder by sending them to TinyPNG for compression and resaving them in a specified location. This workflow enhances storage efficiency and speeds up image loading times, ensuring your files are always optimized without manual intervention.

7/8/2025
10 nodes
Medium
manualmediumgoogledrivetriggergoogle drivesticky noteapiintegration
Categories:
Manual TriggeredMedium WorkflowCloud Storage & File Management
Integrations:
GoogleDriveTriggerGoogle DriveSticky Note

Target Audience

This workflow is ideal for:


- Photographers looking to save storage space on Google Drive by optimizing images automatically.
- Content creators who frequently upload images and want to ensure their files are optimized for web use.
- Small business owners who manage online stores and need to maintain fast loading times by reducing image sizes.
- Marketing teams that handle a large volume of visual content and require efficient image management solutions.

Problem Solved

This workflow addresses the following issues:


- Storage Inefficiency: Automatically optimizes images uploaded to Google Drive, reducing file size without compromising quality.
- Manual Processing: Eliminates the need for manual image optimization, saving time and effort for users.
- Performance Issues: Ensures that images are web-ready, improving loading times for websites and online platforms.

Workflow Steps

The workflow process consists of the following steps:


1. Triggering Event: The workflow is triggered when a new image is uploaded to a specified Google Drive folder.
2. Image Download: The newly uploaded image is downloaded from Google Drive.
3. Image Optimization: The downloaded image is sent to TinyPNG for optimization, which reduces its file size.
4. Retrieving Optimized Image: The optimized image is retrieved from TinyPNG after processing.
5. Saving Optimized Image: The final step involves saving the optimized image back to a designated Google Drive folder.

Customization Guide

Users can customize this workflow by:


- Selecting the Folder: Change the Google Drive folder that n8n watches for new images by updating the folder settings in the Google Drive Trigger node.
- API Key Configuration: Obtain and configure a new API key from TinyPNG and update the authorization header in the HTTP Request node to include the new key.
- Output Folder Selection: Specify a different Google Drive folder for saving optimized images by adjusting the folder ID in the Google Drive node.
- File Naming: Customize the naming convention for the optimized images by modifying the parameters in the Google Drive node.