A fast and efficient command-line image processing tool written in Go. Convert images between formats and compress them with ease.
- Format Conversion: Convert between JPEG, PNG, WebP, TIFF, and AVIF formats
- Image Compression: Compress images to create
.compressedfiles with configurable quality - Fast Processing: Built with high-performance image processing libraries
- Simple CLI: Easy-to-use command-line interface
- Cross-platform: Works on Linux, macOS, and Windows
git clone https://github.com/d3xfoo/wimg.git
cd wimg
go build -o wimg cmd/wimg/main.go
sudo mv wimg /usr/local/bin/# Convert image to WebP format
wimg image.jpg .webp
# Compress image (creates image.compressed.jpg)
wimg image.jpg
# Compress and replace original with compressed version
wimg -r image.jpg# Convert JPEG to PNG
wimg photo.jpg .png
# Convert to WebP (great for web)
wimg photo.jpg .webp
# Convert to AVIF (modern format)
wimg photo.jpg .avif
# Compress a large image (creates large-photo.compressed.jpg)
wimg large-photo.jpg
# Compress and replace original (keeps only compressed version)
wimg -r photo.jpg- Input: JPEG, PNG, WebP, TIFF, AVIF
- Output: JPEG, PNG, WebP, TIFF, AVIF
When compressing an image without the -r flag:
- Creates a new file with
.compressedextension - Original file is preserved
- Example:
wimg photo.jpg→ createsphoto.compressed.jpg
When using the -r flag:
- Creates compressed version
- Removes the original file
- Renames compressed file to original name
- Example:
wimg -r photo.jpg→ replacesphoto.jpgwith compressed version
- Go 1.24.5 or later
- bimg - Image processing library
make buildmake testmake release- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- bimg for the excellent image processing capabilities
- The Go community for the robust ecosystem