Package Exports
- tinypng-go
- tinypng-go/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tinypng-go) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
tinypng-go
English | 中文
This is a cli tool to compress image quickly and effectively by using tinypng.
- compress ratio is 50% - 70%
- support to compress all images in directory recursively
- support to replace or dump compressed images
- support to avoid repeat compress
- support to display compress result
QUICK START
tinypng-go images # compress images in directory and replace all of it.
tinypng-go logo.png -o logo-new.png # compress a single image
tinypng-go images -o imagesDir # compress images in directory and output to images in new directory
INSTALLATION
You can globally install this tool or use npx.
npx
npx tinypng-go <filename or dirname> [OPTIONS]global install
npm
npm install -g tinypng-goyarn
yarn global add tinypng-gocheck if you have installed
tinypng-go -vUSAGE
tinypng-go <filename or directory> [OPTIONS]
-v, --version show current version
-o, --output <output> set output path
-m, --max [max] max async compress tasks(The higher the number, the faster the speed)
-a, --all force compress all images(include compressed images)
-h, --help show help for commandif you set max a big number,tasks will run faster, but the memory will cost more.
example
tinypng-go images # compress images in directory and replace all of it.
tinypng-go logo.png -o logo-new.png # compress a single image
tinypng-go images -o imagesDir # compress images in directory and output to images in new
tinypng-go images -m 30 # compress images in directory with max tasks 30