Optimize images for the web in seconds
Features • Installation • Usage • Finder Integration • Configuration
✨ WebP Conversion - Automatically converts images to WebP format for optimal web performance
📐 Smart Resizing - Limits maximum dimensions to 1920x1080 while maintaining aspect ratio
🎯 Size Optimization - Keeps files under 500KB with intelligent quality adjustment
🖼️ Quality Preservation - Maintains visual quality using binary search for optimal compression
🚀 Batch Processing - Process entire folders with a single command
🍎 macOS Native - Finder Quick Actions and Droplet app included
⚡ Fast & Simple - One command, no configuration needed
brew tap jack/quick-compress
brew install quick-compresscurl -fsSL https://raw.githubusercontent.com/jack/quick-compress/main/install.sh | bash# Clone the repository
git clone https://github.com/jack/quick-compress.git
# Run the install script
cd quick-compress
./install.sh- macOS or Linux
- ImageMagick (installed automatically by the install script)
compress path/to/image.jpgOutput: Creates path/to/image.webp (235KB from 2.5MB original)
compress path/to/folderOutput: Converts all images in the folder to optimized WebP files
- JPG / JPEG
- PNG
- GIF
- BMP
- TIFF
All formats are converted to WebP for maximum compression and web compatibility.
- Right-click any image or folder in Finder
- Go to Services → Compress Images for Web
- Get instant optimization!
- Find "Compress Images" app in your Applications folder
- Drag any image or folder onto the app icon
- Or double-click to use the file picker
- Open Finder
- Hold ⌘ Command and drag "Compress Images" app to the toolbar
- Select files and click the button anytime!
| Setting | Value | Description |
|---|---|---|
| Max Width | 1920px | Maximum image width |
| Max Height | 1080px | Maximum image height |
| Max File Size | 500KB | Target file size limit |
| Initial Quality | 85% | Starting WebP quality |
| Min Quality | 60% | Lowest quality before giving up |
Edit the script to customize settings:
# Open the script for editing
nano $(which compress)Modify these variables at the top:
MAX_WIDTH=2560 # Change max width
MAX_HEIGHT=1440 # Change max height
MAX_SIZE=1048576 # Change to 1MB (in bytes)
QUALITY=90 # Change initial quality- Analyze - Checks image dimensions and current file size
- Resize - Scales down images exceeding max dimensions
- Convert - Converts to WebP at 85% quality
- Optimize - If file > 500KB, uses binary search to find best quality under limit
- Save - Outputs optimized WebP in the same location
| Original | Compressed | Savings |
|---|---|---|
| 2.5 MB PNG | 235 KB WebP | 90.6% |
| 4.1 MB JPG | 487 KB WebP | 88.1% |
| 8.7 MB TIFF | 512 KB WebP | 94.1% |
# Optimize website assets
compress ~/MyWebsite/images/
# Prepare photos for blog
compress ~/Desktop/vacation-photos/
# Optimize logo
compress ~/Downloads/logo.pngMake sure your shell configuration was reloaded:
source ~/.zshrc # or ~/.bashrcOr use the full path:
~/.local/bin/compress image.jpgInstall ImageMagick:
# macOS
brew install imagemagick
# Ubuntu/Debian
sudo apt-get install imagemagick
# Fedora
sudo dnf install imagemagickMake sure the script is executable:
chmod +x ~/.local/bin/compressContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
- ImageMagick for the powerful image processing
- Inspired by the need for simple, fast web optimization
Made with ❤️ for the web development community