easytiny is a simple CLI for compressing jpg/png images by tinypng api.
$ npm install -g easytiny
Set your tinypng api key. Get your api key by visiting tinypng, 500 images limited every month, but you can register more api keys.
$ easytiny config set key XXXX-XXXX-XXXXXXXXXXXX
$ easytiny config set proxy http://user:firstname.lastname@example.org:8080
Run with default mode, no resize and compressed images output into a new
easytiny folder with a timestamp
$ easytiny start
Run with overwrite mode, the original images will be overwritten by compressed images
$ easytiny start --overwrite
shorthand for overwrite mode
$ easytiny start -o
Run with resize mode, images will be resized before compressing
$ easytiny start --resize
shorthand for resize mode
$ easytiny start -r
There are three methed for resizing,
cover. You can learn more here.
Scales the image down proportionally. You must provide either a target width or a target height, but not both. The scaled image will have exactly the provided width or height.
Scales the image down proportionally so that it fits within the given dimensions. You must provide both a width and a height. The scaled image will not exceed either of these dimensions.
Scales the image proportionally and crops it if necessary so that the result has exactly the given dimensions. You must provide both a width and a height. Which parts of the image are cropped away is determined automatically. An intelligent algorithm determines the most important areas and leaves these intact.
Overwrite mode and resize mode can be joined together.
$ easytiny start -ro
Get the main help.
$ easytiny -h
Get the detail help.
$ easytiny start -h $ easytiny config -h