Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Batch image processor. Resize, compress, convert, and watermark thousands of images in seconds.

License

Notifications You must be signed in to change notification settings

strabo231/imgbatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ImgBatch - Batch Image Processor

Sponsor License GitHub Stars ImageMagick Platform

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.


Why ImgBatch?

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

Installation

curl -sSL https://raw.githubusercontent.com/strabo231/imgbatch/main/install.sh | bash

Requirements:

# Ubuntu/Debian
sudo apt install imagemagick exiftool

# macOS
brew install imagemagick exiftool

Quick Start

# 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/

Real-World Results

$ 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

Use Cases

πŸ“¦ E-commerce

# Product photos optimized for web
imgbatch resize products/*.jpg --max 2000 --quality 85
# Result: Fast loading, happy customers

πŸ“Έ Photography

# Export full portfolio for web
imgbatch resize portfolio/*.jpg --width 1920 --quality 90
# Result: Beautiful images, manageable file sizes

πŸ”’ Privacy

# Remove GPS location before posting
imgbatch strip social-media/*.jpg
# Result: No one knows where you took the photo

🌐 Web Optimization

# Optimize entire website image directory
imgbatch compress website/images/*.jpg --quality 85
# Result: 70% smaller images, faster site

🎨 iPhone β†’ Desktop

# Convert iPhone photos to universal JPG
imgbatch convert *.heic --to jpg
# Result: Compatible everywhere

Features

πŸ“ 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

Commands

Resize

# 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

Compress

# 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/

Convert

# 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

Strip Metadata

# 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

Watermark

# 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

Advanced Usage

Combine Operations

# 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

Recursive Processing

# Process all images in subdirectories
find . -name "*.jpg" -exec imgbatch compress {} --quality 85 \;

# Or use shell glob
imgbatch resize **/*.jpg --width 1920

Output to Different Directory

# 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/

Options Reference

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

Examples

E-commerce Store Setup

# 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!

Photography Portfolio

# 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

Social Media Prep

# 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

Website Optimization

# 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"

πŸ’– Support This Project

ImgBatch is free and always will be. But if it saves you hours of work...

Why Sponsor?

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
Sponsor ImgBatch

🏒 Using ImgBatch for Business?

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)

View all sponsor tiers β†’

Processing 10,000+ images/month? Let's talk about enterprise support


πŸš€ Roadmap

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!


🀝 Contributing

Contributions are welcome!

Ways to contribute:

  • πŸ› Report bugs
  • πŸ’‘ Suggest features
  • πŸ“ Improve documentation
  • πŸ”§ Submit pull requests
  • πŸ’– Sponsor development

See CONTRIBUTING.md for guidelines.


πŸ“ License

MIT License - See LICENSE

TL;DR: Free for personal and commercial use. Do whatever you want with it!


πŸ™ Credits

Built with:

Inspired by:

  • The need for simple, fast batch image processing
  • Frustration with slow GUI tools
  • Love for the command line

πŸ’¬ Support & Community

Questions?

Stay Updated:

Support Development:


πŸ“Š Stats

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

About

Batch image processor. Resize, compress, convert, and watermark thousands of images in seconds.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages