CLI client for the reSmush.it Image Optimization API
Use reSmush.it Image Optimizer for FREE to optimize your pictures file sizes. Improve your performances by using reSmush.it, the 3 billion images API optimizer.
reSmush.it Image Optimizer allow to use free Image optimization based on reSmush.it API. reSmush.it provides image size reduction based on several advanced algorithms. The API accept JPG, PNG and GIF files up to 5MB.
This tool allow you to perform a powerful optimization of one or multiple pictures using a bash (command line) script based on the reSmush.it API.
This tool can optimize on or several pictures. The recursive option is not yet implemented
resmushit-cli.shexecutable using the following command :
chmod +x resmushit-cli.sh
This will require to be executed on a Linux based Operating System (Linux or MacOS). The following packages must be installed on the system
jq(see jq Homepage)
If you’re using a Linux system (Debian, CentOS…) you can install after cloning from the GIT repo by typing the following command as
root user (or using
mv resmushit-cli.sh /usr/bin/resmushit;chmod +x /usr/bin/resmushit
Your CLI optimizer will be available everywhere in your server/computer by typing
Replace in the examples below
./resmushit-cli.sh if you haven’t installed the optimizer globally on your machine.
Optimize a picture and create a new optimized picture file
The optimized file will be named
Optimize a picture and replace the original file
resmushit mypicture.jpg --preserve-filename
Optimize a picture and set a optimization factor
resmushit -q 92 mypicture.jpg
Optimize multiple pictures and export them into a folder
resmushit --output myexportdirectory/ *
Optimize a picture and preserve its EXIF data
resmushit mypicture.jpg --preserve-exif
--help: display the help menu
--version: display the current version of reSmushit CLI client
--quality <quality>: specify the quality factor between 0 and 100 (default is 92).
--output <directory>: specify an output directory (will be created if not present)
--preserve-filename: avoid to add
-optimizedin the filename when the image is optimized
--preserve-exif: will preserve EXIF data in the file after optimization
--notime: avoid to display timer in output
--quiet: run in quiet mode
--update: perform an auto-upgrade process
All bugs should be reported to : firstname.lastname@example.org
This project is licensed under the MIT License - see the LICENSE.md file for details
Help us by paying us a couple of !