Three macOS Automator workflows that add right-click context menu options in Finder for converting images to modern web formats.
- Save as AVIF - Convert images to AVIF format using npx
- Save as WEBP - Convert images to WebP format with quality 85
- Tinify - Compress PNG/JPG/JPEG images using TinyPNG API
- Node.js and npm installed
npxavailable in PATH- AVIF CLI tool (installed automatically via npx)
cwebpinstalled via Homebrew:brew install webp
- TinyPNG API key (get one at tinypng.com)
jqfor JSON parsing:brew install jq
- Download the workflows from this repository
- Double-click each
.workflowfile to install - macOS will ask for permission to install - click "Install"
- The actions will appear in Finder's right-click menu under "Services" or "Quick Actions"
Before using the Tinify workflow:
- Open the Tinify workflow in Automator
- Find the line:
API_KEY="YOUR_TINYFY.COM_API_KEY" - Replace
YOUR_TINYFY.COM_API_KEYwith your actual TinyPNG API key - Save the workflow
- In Finder, select one or more image files
- Right-click and navigate to Services or Quick Actions
- Choose your desired conversion:
- Save as AVIF - Creates
.aviffiles - Save as WEBP - Creates
.webpfiles with 85% quality - Tinify - Creates
_compressedversions of originals
- Save as AVIF - Creates
- AVIF/WEBP: Creates new files in the same directory as the original
- Tinify: Creates files with
_compressedsuffix (e.g.,image_compressed.png)
Edit the WebP workflow and change the -q 85 parameter:
/opt/homebrew/bin/cwebp -q 85 "$FILE" -o "${FILE%.*}.webp"Edit the shell scripts in each workflow to customize output file naming patterns.
- Go to System Settings > Privacy & Security > Extensions > Finder
- Enable the workflows
The workflows include PATH setup:
export PATH="/usr/local/bin:/opt/homebrew/bin:$PATH"Adjust if your tools are installed elsewhere.
Grant Automator/Finder necessary permissions in: System Settings > Privacy & Security > Automation
- Format: macOS Automator Quick Actions (
.workflow) - Type: Finder Services Menu items
- Input: Image files (
public.imagetype) - Shell: Bash/Zsh scripts with error handling
Feel free to fork and submit pull requests for improvements!
These workflows are provided as-is for personal use. Respect the licenses of the underlying tools (npx/avif, cwebp, TinyPNG API).
- Tinify has API rate limits (500 compressions/month on free tier)
- Original files are never modified - new files are created
- AVIF offers better compression than WebP but has less browser support
- WebP has excellent browser support and good compression