
Blazing Fast, Zero-Friction
Image Optimization.
GopherSnap is a high-performance, concurrent Command Line Interface (CLI) image converter written entirely in Go. Effortlessly convert, resize, and compress entire directories into modern web-optimized formats like WebP and AVIF.
Why GopherSnap?
Stop fighting complex shell scripts and massive C dependencies.
Blazing Fast Concurrency
Built on Go, it leverages lightweight goroutines to process multiple images in parallel, drastically reducing wait times for large batches.
Pure Portability (No CGO)
Uses pure-Go/WASM implementations for complex formats like WebP and AVIF. No messy C library dependencies to install; runs anywhere Go runs.
Zero-Friction Batching
Instead of writing complex scripts, just point GopherSnap at a folder. It automatically processes all supported images and mirrors the exact directory structure.
Smart Compression
Features like a --max-size flag allow the tool to intelligently degrade quality until an image fits under a specific file size limit.
Who is it for?
Web Developers & Designers
Bulk-convert heavy PNGs/JPGs into WebP or AVIF to improve website load times and Core Web Vitals.
System Administrators
A reliable, easily deployable CLI tool for automated image optimization pipelines on servers (no C dependencies).
Content Creators & Photographers
Quickly resize and compress massive folders of high-res photos for web sharing.
Key Features
- Batch Processing & Directory Mirroring
- Modern Format Support (JPG, PNG, WebP, AVIF)
- Concurrent Execution (Customizable worker pools)
- Proportional Resizing (Maintain aspect ratio)
- Target File Sizing (--max-size flag)
- Beautiful CLI UI with styled progress bars
How to Use GopherSnap
Get up and running in seconds. No complex setup required.
Installation
Install directly via Go:
go install github.com/benjaminjvdm/GopherSnap@latestBasic Conversion
Convert an entire directory to WebP (default), saving to a new output folder:
gophersnap convert -i ./raw-photos -o ./web-readyAdvanced: AVIF & Concurrency
Convert a specific image to AVIF, set quality to 75%, and use 8 workers:
gophersnap convert -i hero-image.jpg -o ./optimized -f avif -q 75 -j 8Smart Resizing
Resize images to a max width of 800px (height scales automatically):
gophersnap convert -i ./images --width 800Target File Size Limit
Ensure output files are less than 2 Megabytes:
gophersnap convert -i ./images --max-size 2mb