Convert images to WebP format with optimal compression and blazing-fast performance.
- 🚀 Bulk Conversion - Convert multiple files/directories in parallel
- 📁 Multiple Input Formats - JPEG, PNG, GIF (animated), BMP
- 🎯 Smart Quality Control - Presets and manual quality settings
- ⚡ High Performance - Parallel processing using all CPU cores
- 🔄 Image Resizing - Scale images with aspect ratio preservation
- 🎨 Transparency Support - Preserves alpha channel from PNG/GIF
- 📊 Progress Tracking - Real-time progress bars and statistics
- 🔍 Dry Run Mode - Preview conversions before executing
- 🔌 Plugin Architecture - Multiple conversion engines for optimal performance
# Convert all JPEGs in current directory
imgconvert *.jpg
# Recursive conversion with custom quality
imgconvert -r -q 90 .
# Fast mode for large batches
imgconvert --fast -r /path/to/photos
# Resize and convert
imgconvert --scale 50 *.jpg
# Dry run to preview
imgconvert -n -r .- Go 1.20 or later (installer can set this up for you)
git clone https://github.com/aevrHQ/imgconvert.git
cd imgconvert
./install.shThe installer will:
- Set up Go if needed (installs to
~/gosdk/bin) - Install the tool to
~/go/bin/imgconvert(wrapper script) - Add
~/go/binto your PATH
source ~/.zshrc # if using zsh (default on macOS)
source ~/.bashrc # if using bashYou only need to do this once in each open terminal. New terminals will work automatically.
Why a wrapper script?
macOS Gatekeeper blocks unsigned binaries. The installer creates a wrapper that uses go run to avoid code signing issues.
If the installer doesn't work:
git clone https://github.com/aevrHQ/imgconvert.git
cd imgconvert
# Create wrapper script
cat > ~/go/bin/imgconvert << 'EOF'
#!/bin/bash
CURRENT_DIR="$(pwd)"
export PATH="$HOME/gosdk/bin:$PATH"
ARGS=()
for arg in "$@"; do
if [[ -e "$arg" ]] || [[ -e "$CURRENT_DIR/$arg" ]]; then
if [[ "$arg" = /* ]]; then
ARGS+=("$arg")
else
ARGS+=("$CURRENT_DIR/$arg")
fi
else
ARGS+=("$arg")
fi
done
cd /Users/$(whoami)/Documents/devprojects/image-converter
exec go run cmd/imgconvert/main.go "${ARGS[@]}"
EOF
chmod +x ~/go/bin/imgconvert
# Add to PATH
echo 'export PATH="$HOME/go/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcgo install github.com/aevrHQ/imgconvert/cmd/imgconvert@latestThis installs a compiled binary to ~/go/bin/imgconvert.
Add to PATH (if not already):
# For bash
echo 'export PATH="$HOME/go/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# For zsh
echo 'export PATH="$HOME/go/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcgit clone https://github.com/aevrHQ/imgconvert.git
cd imgconvert
go build -o imgconvert ./cmd/imgconvert
# Install globally
sudo mv imgconvert /usr/local/bin/git clone https://github.com/aevrHQ/imgconvert.git
cd imgconvert
./build.sh
sudo mv imgconvert /usr/local/bin/go install github.com/aevrHQ/imgconvert/cmd/imgconvert@latestThis installs to %USERPROFILE%\go\bin\imgconvert.exe.
Add to PATH:
- Search for "Environment Variables" in Windows
- Edit "Path" for your user
- Add:
%USERPROFILE%\go\bin - Restart your terminal
git clone https://github.com/aevrHQ/imgconvert.git
cd imgconvert
go build -o imgconvert.exe .\cmd\imgconvertThen move imgconvert.exe to a directory in your PATH, or add the current directory to PATH.
# Convert images
.\imgconvert.exe *.jpg
# Or if in PATH
imgconvert *.jpgimgconvert *.jpgAll platforms:
imgconvert --version
imgconvert --helpConvert a single file:
imgconvert photo.jpg
# Creates: photo.webpConvert multiple files:
imgconvert *.jpg *.png
# Processes all JPEG and PNG filesConvert from any directory:
cd ~/Pictures/vacation
imgconvert *.jpg
# Works from anywhere after installationBulk convert with quality preset:
imgconvert --preset high *.jpgRecursive directory conversion:
imgconvert -r ~/Pictures/Resize while converting:
imgconvert --scale 50 *.jpg # 50% size
imgconvert --width 1920 *.jpg # Max 1920px widePreview before converting:
imgconvert -n -r .
# Shows what will be converted without doing itCustom output directory:
imgconvert -o ./webp-output *.jpgDelete originals after conversion:
imgconvert --delete-original *.jpg| Preset | Quality | Use Case |
|---|---|---|
lossless |
100 | Perfect quality, larger files |
high |
90 | Photography, high-quality images |
medium |
85 | Default - Great balance |
web |
80 | Web images, good quality |
low |
60 | Previews, thumbnails |
thumb |
50 | Small thumbnails |
half |
85 + 50% scale | Half size with good quality |
"killed" or "zsh: killed" errors
This happens with compiled binaries on macOS due to code signing. Use the installer script which creates a wrapper that avoids this issue.
"command not found: imgconvert"
Solution: Reload your shell configuration:
source ~/.zshrc # or source ~/.bashrcCannot access file errors
If you see cannot access file.jpg: no such file or directory:
- Make sure you've sourced your shell config (
source ~/.zshrc) - Verify the files exist:
ls *.jpg - Try using absolute paths:
imgconvert /full/path/to/file.jpg
Permission denied
Make sure the wrapper script is executable:
chmod +x ~/go/bin/imgconvert"command not found: imgconvert"
Make sure ~/go/bin is in your PATH:
export PATH="$HOME/go/bin:$PATH"
# Add to ~/.bashrc or ~/.zshrc to make permanentPermission denied
Make the binary executable:
chmod +x ~/go/bin/imgconvert
# Or if installed globally:
sudo chmod +x /usr/local/bin/imgconvert"imgconvert is not recognized"
Add Go's bin directory to your PATH:
- Open "Edit environment variables for your account"
- Edit "Path" variable
- Add:
%USERPROFILE%\go\bin - Restart terminal/PowerShell
Wildcard not working
PowerShell and Command Prompt handle wildcards differently. Use quotes:
imgconvert "*.jpg"Or use Get-ChildItem:
Get-ChildItem *.jpg | ForEach-Object { imgconvert $_.FullName }"go: command not found"
Install Go from golang.org/dl
Out of memory errors
Reduce parallel jobs:
imgconvert -j 2 *.jpg # Use only 2 workersSlow performance
Ensure you're not limiting CPU:
imgconvert -j 0 *.jpg # Use all available cores (default)Use parallel processing (default):
- Tool automatically uses all CPU cores
- Adjust with
-jflag:imgconvert -j 4 *.jpg
Fast mode for large batches:
imgconvert --fast -r /large/photo/library
# Uses quality 75 with optimized settingsProcess in batches:
# For thousands of files, process subdirectories separately
for dir in */; do imgconvert -r "$dir"; doneTypical file size reductions:
- High quality (q=90): 60-70% smaller
- Default (q=85): 70-80% smaller
- Thumbnail preset: 90%+ smaller
- 50% scaling: 85%+ smaller
Example:
Input: photo.jpg (23.6 MB)
Output: photo.webp (7.0 MB)
Reduction: 70.3%
See SPEC.md for complete technical specification and design decisions.
MIT License - See LICENSE for details
🚧 Under Active Development - v0.1.0 coming soon!