Skip to content

smombartz/quick-actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

macOS Image Conversion Quick Actions

Three macOS Automator workflows that add right-click context menu options in Finder for converting images to modern web formats.

image

🎯 Features

  • 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

📋 Prerequisites

For AVIF Conversion

  • Node.js and npm installed
  • npx available in PATH
  • AVIF CLI tool (installed automatically via npx)

For WebP Conversion

  • cwebp installed via Homebrew:
    brew install webp

For Tinify

  • TinyPNG API key (get one at tinypng.com)
  • jq for JSON parsing:
    brew install jq

🚀 Installation

  1. Download the workflows from this repository
  2. Double-click each .workflow file to install
  3. macOS will ask for permission to install - click "Install"
  4. The actions will appear in Finder's right-click menu under "Services" or "Quick Actions"

Configure Tinify API Key

Before using the Tinify workflow:

  1. Open the Tinify workflow in Automator
  2. Find the line: API_KEY="YOUR_TINYFY.COM_API_KEY"
  3. Replace YOUR_TINYFY.COM_API_KEY with your actual TinyPNG API key
  4. Save the workflow

💡 Usage

  1. In Finder, select one or more image files
  2. Right-click and navigate to Services or Quick Actions
  3. Choose your desired conversion:
    • Save as AVIF - Creates .avif files
    • Save as WEBP - Creates .webp files with 85% quality
    • Tinify - Creates _compressed versions of originals

📁 Output

  • AVIF/WEBP: Creates new files in the same directory as the original
  • Tinify: Creates files with _compressed suffix (e.g., image_compressed.png)

⚙️ Customization

Adjust WebP Quality

Edit the WebP workflow and change the -q 85 parameter:

/opt/homebrew/bin/cwebp -q 85 "$FILE" -o "${FILE%.*}.webp"

Modify Output Naming

Edit the shell scripts in each workflow to customize output file naming patterns.

🔧 Troubleshooting

Workflows don't appear in Finder

  • Go to System Settings > Privacy & Security > Extensions > Finder
  • Enable the workflows

PATH issues

The workflows include PATH setup:

export PATH="/usr/local/bin:/opt/homebrew/bin:$PATH"

Adjust if your tools are installed elsewhere.

Permission errors

Grant Automator/Finder necessary permissions in: System Settings > Privacy & Security > Automation

📝 Technical Details

  • Format: macOS Automator Quick Actions (.workflow)
  • Type: Finder Services Menu items
  • Input: Image files (public.image type)
  • Shell: Bash/Zsh scripts with error handling

🤝 Contributing

Feel free to fork and submit pull requests for improvements!

📄 License

These workflows are provided as-is for personal use. Respect the licenses of the underlying tools (npx/avif, cwebp, TinyPNG API).

⚠️ Notes

  • 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

About

MacOS Image Quick Actions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors