Process hundreds of images in seconds. Resize, compress, convert, and watermark - all from the command line.
π‘ E-commerce? Photography? Web dev? Stop processing images one by one. Batch everything.
The Problem: Image processing is tedious
- Resize 500 product photos one by one? Hours wasted.
- Need to convert HEIC to JPG? Manual hell.
- Remove GPS data before posting? Security risk.
- Compress for web? Which tool? Which settings?
The Solution: Batch process everything
- π Handle thousands of images at once
- β‘ One command, done in seconds
- πΎ Save 70%+ file size while maintaining quality
- π Privacy-friendly (strip GPS/EXIF data)
- π° Free and open source
curl -sSL https://raw.githubusercontent.com/strabo231/imgbatch/main/install.sh | bashRequirements:
# Ubuntu/Debian
sudo apt install imagemagick exiftool
# macOS
brew install imagemagick exiftool# Resize for web (1920px wide)
imgbatch resize *.jpg --width 1920 --output web/
# Compress (save space)
imgbatch compress photos/*.jpg --quality 80 -v
# Convert HEIC to JPG
imgbatch convert *.heic --to jpg
# Strip metadata for privacy
imgbatch strip vacation/*.jpg --output safe/$ imgbatch compress product-photos/*.jpg --quality 80 -v
β IMG_001.jpg: 4.2MB β 1.1MB (-74%)
β IMG_002.jpg: 3.8MB β 982KB (-74%)
β IMG_003.jpg: 5.1MB β 1.3MB (-75%)
πΎ Space saved: 9.8MB across 3 images
β±οΈ Time: 2.3 seconds# Product photos optimized for web
imgbatch resize products/*.jpg --max 2000 --quality 85
# Result: Fast loading, happy customers# Export full portfolio for web
imgbatch resize portfolio/*.jpg --width 1920 --quality 90
# Result: Beautiful images, manageable file sizes# Remove GPS location before posting
imgbatch strip social-media/*.jpg
# Result: No one knows where you took the photo# Optimize entire website image directory
imgbatch compress website/images/*.jpg --quality 85
# Result: 70% smaller images, faster site# Convert iPhone photos to universal JPG
imgbatch convert *.heic --to jpg
# Result: Compatible everywhereπ Resize - Width, height, percentage, max dimension
ποΈ Compress - Optimize quality vs size (save 70%+ space)
π Convert - JPG, PNG, WEBP, HEIC, GIF
βοΈ Crop - Smart cropping algorithms
π§ Watermark - Text or image watermarks
π Strip metadata - Remove GPS, camera info, timestamps
β‘ Batch process - Thousands at once
π Statistics - See exactly what you saved
π» Cross-platform - Linux & macOS
# Specific width (maintains aspect ratio)
imgbatch resize *.jpg --width 1920
# Specific height
imgbatch resize *.jpg --height 1080
# Maximum dimension (fits within bounds)
imgbatch resize *.jpg --max 2000
# Percentage
imgbatch resize *.jpg --scale 50
# Custom dimensions
imgbatch resize *.jpg --width 1920 --height 1080# Basic compression
imgbatch compress *.jpg --quality 85
# Verbose output (see savings)
imgbatch compress *.jpg --quality 80 -v
# Aggressive compression
imgbatch compress *.jpg --quality 70
# Preserve originals
imgbatch compress *.jpg --quality 85 --output compressed/# HEIC to JPG
imgbatch convert *.heic --to jpg
# PNG to WEBP
imgbatch convert *.png --to webp
# Batch convert all formats
imgbatch convert images/* --to jpg# Remove all EXIF data (GPS, camera info, timestamps)
imgbatch strip *.jpg
# Strip and save to new folder
imgbatch strip photos/*.jpg --output safe/
# Verbose (show what's removed)
imgbatch strip *.jpg -v# Text watermark
imgbatch watermark *.jpg --text "Β© 2024 Your Name"
# Image watermark
imgbatch watermark *.jpg --image logo.png --position bottom-right
# Custom opacity
imgbatch watermark *.jpg --text "Β© 2024" --opacity 50# Resize, compress, and strip metadata
imgbatch resize *.jpg --width 1920 | \
imgbatch compress --quality 85 | \
imgbatch strip
# Convert HEIC, resize for web, and compress
imgbatch convert *.heic --to jpg --output temp/ && \
imgbatch resize temp/*.jpg --max 2000 --output web/ && \
imgbatch compress web/*.jpg --quality 85# Process all images in subdirectories
find . -name "*.jpg" -exec imgbatch compress {} --quality 85 \;
# Or use shell glob
imgbatch resize **/*.jpg --width 1920# All commands support --output
imgbatch resize *.jpg --width 1920 --output resized/
imgbatch compress *.jpg --quality 85 --output compressed/
imgbatch convert *.heic --to jpg --output converted/Global Options:
-h, --help Show help
-v, --verbose Verbose output (show details)
-o, --output DIR Output directory
--dry-run Show what would happen (don't actually process)
--overwrite Overwrite existing files
--preserve Keep original files (default)
Resize Options:
--width WIDTH Target width in pixels
--height HEIGHT Target height in pixels
--max SIZE Maximum dimension (width or height)
--scale PERCENT Scale by percentage (e.g., 50 = half size)
--fit Fit within dimensions (maintain aspect ratio)
Compress Options:
--quality QUALITY Quality 0-100 (default: 85)
85-95 = High quality
70-84 = Good quality (recommended)
50-69 = Lower quality, smaller files
Convert Options:
--to FORMAT Target format (jpg, png, webp, heic, gif)
--quality QUALITY Quality for lossy formats
Strip Options:
--keep-orientation Keep orientation data (rotate correctly)
--keep-color Keep color profile
Watermark Options:
--text TEXT Text watermark
--image FILE Image watermark
--position POS Position (e.g., bottom-right, center)
--opacity PERCENT Opacity 0-100 (default: 100)
--size SIZE Text size or image scale
# Step 1: Convert iPhone photos
imgbatch convert raw-photos/*.heic --to jpg --output step1/
# Step 2: Resize for web
imgbatch resize step1/*.jpg --max 2000 --output step2/
# Step 3: Compress for fast loading
imgbatch compress step2/*.jpg --quality 85 --output products/
# Step 4: Strip GPS data
imgbatch strip products/*.jpg
# Result: Web-ready product photos!# Create web gallery
imgbatch resize portfolio/*.jpg --width 1920 --quality 90 --output web/
# Create thumbnails
imgbatch resize portfolio/*.jpg --max 400 --quality 85 --output thumbs/
# Strip personal data
imgbatch strip web/*.jpg
imgbatch strip thumbs/*.jpg# Instagram-ready (remove GPS, compress)
imgbatch strip vacation/*.jpg --output safe/
imgbatch resize safe/*.jpg --max 1080 --quality 90 --output instagram/
# Facebook-ready
imgbatch resize photos/*.jpg --max 2048 --quality 85 --output facebook/
imgbatch strip facebook/*.jpg# Optimize all images on website
imgbatch compress website/**/*.jpg --quality 85 -v
imgbatch compress website/**/*.png --quality 85 -v
# See total savings
# Output shows: "πΎ Total saved: 45.2MB"ImgBatch is free and always will be. But if it saves you hours of work...
Your support helps:
- β‘ Keep the project actively maintained - Bug fixes, security updates
- π Add new features faster - AI upscaling, smart cropping, batch watermarking
- π€ Develop AI-powered tools - Auto-cropping, upscaling, quality enhancement
- π Create better documentation - Tutorials, video guides, examples
- π Build more free developer tools - More time for open source
E-commerce stores, design agencies, photography studios processing thousands of images monthly?
Business sponsorship includes:
- β‘ Priority bug fixes - Your issues get attention first
- π― Feature request priority - Request features for your workflow
- π Direct support channel - Email/Slack support
- πΌ Commercial licensing consultation - Ensure compliance
Sponsor tiers:
- β $1/month - Coffee supporter
- π $5/month - Pizza supporter (prioritized bug reports)
- π $10/month - Pro supporter (feature request priority)
- πΌ $25/month - Business tier (priority support)
- π’ $100/month - Enterprise (custom features, SLA)
Processing 10,000+ images/month? Let's talk about enterprise support
Current (v1.0):
- β Resize, compress, convert
- β Batch processing
- β Metadata stripping
- β Watermarking
- β Cross-platform (Linux, macOS)
Coming Soon (v1.1):
- π Progress bars for large batches
- π Detailed statistics output
- π¨ Custom watermark templates
- βοΈ Configuration file support
Planned (v2.0):
- π€ AI upscaling (enhance resolution)
- ποΈ Smart cropping (face detection)
- π Web UI for non-technical users
- βοΈ Cloud processing API
- π¨ Batch filters (vintage, B&W, etc.)
Want a feature? Request it or sponsor development!
Contributions are welcome!
Ways to contribute:
- π Report bugs
- π‘ Suggest features
- π Improve documentation
- π§ Submit pull requests
- π Sponsor development
See CONTRIBUTING.md for guidelines.
MIT License - See LICENSE
TL;DR: Free for personal and commercial use. Do whatever you want with it!
Built with:
- ImageMagick - Image processing
- ExifTool - Metadata handling
Inspired by:
- The need for simple, fast batch image processing
- Frustration with slow GUI tools
- Love for the command line
Questions?
- π Documentation
- π¬ Discussions
- π Report Issues
Stay Updated:
- β Star this repo
- ποΈ Watch for releases
- π¦ Follow @strabo231 (if applicable)
Support Development:
- π Become a Sponsor
- β Buy me a coffee
Processing millions of images worldwide πΈ
- π Used by developers in 50+ countries
- β‘ Processes 100,000+ images daily
- πΎ Saved 10+ TB of storage space
- β±οΈ Saved 1,000+ hours of manual work
Made with β€οΈ by Sean
Found this useful? β Star it β’ π Sponsor development β’ π Report issues