This cli tool is now a rust crate available on crates.io! Check out jippigy
A multi-threaded JPG compression tool, powered by turbojpeg.
DSLR Fine JPGs are quite large in size(>10MB), uploading a large number of them to social media platforms can take a lot of time.
Compile it:
cargo build --release
Put the binary file in PATH
so you can use it from anywhere.
Compress with default parameters:
cd your_image_dir/
smoljpg
The tool comes with the following defaults:
- Quality:
50
- Output directory name:
compressed/
.
Compress with custom parameters:
cd your_image_dir/
smoljpg 80
smoljpg -o dest/ 80 #create a directory with a custom name
Compress single images:
smoljpg -s path/to/your/image.jpg
Single images will be stored where your current working directory is.
Help:
smoljpg -h