Automated Image Conversion from JPG/PNG to WEBP

somdn_product_page

This n8n workflow automates the process of converting images from JPG or PNG formats to WEBP using the APYHub API. It begins with a manual trigger for testing, then retrieves image URLs from a Google Sheet where images are listed as ‘FROM’. The workflow extracts filename and extension details, determines if the image is JPG or PNG, and sends it to the appropriate conversion API endpoint. After conversion, it downloads the WEBP image from the returned URL and uploads it to a specified folder in Google Drive. This automation streamlines image optimization tasks, saving time and effort in managing image assets for websites or digital media.

**Step-by-step Workflow:**

1. Manual trigger initiates the workflow for testing.

2. API key is set for API authorization.

3. Retrieves image URLs from Google Sheets where the ‘DONE’ column indicates completion.

4. Extracts filename and extension from each URL.

5. Uses a switch node to check if the image is JPG or PNG.

6. Sends the image URL to the respective APYHub API endpoint for conversion to WEBP.

7. Downloads the converted WEBP image.

8. Uploads the WEBP image to a designated folder in Google Drive.

9. Updates Google Sheets with the new image URL and marks the task as done.

**Practical Use Cases:**

This workflow is useful for web developers and digital asset managers who need to optimize images for faster website loading times, improve SEO, or standardize image formats across projects without manual intervention.

Node Count

11 – 20 Nodes

Nodes Used

code, googleDrive, googleSheets, httpRequest, manualTrigger, set, stickyNote, switch

Reviews

There are no reviews yet.

Be the first to review “Automated Image Conversion from JPG/PNG to WEBP”

Your email address will not be published. Required fields are marked *