/tinypng-cli

An command line tool for tinypng.com

Primary LanguageTypeScriptMIT LicenseMIT

Tinypng CLI

Tinypng CLI is a command line tool for compressing images based on Tinypng.com.npm version

🇨🇳 查看中文版介绍

Features

  • Supports images in png, jpg, jpeg, webp, PNG, JPG, JPEG, WEBP formats
  • Supports compressed packages in tar, gzip, tgz, zip formats

Install Manually

# via npm
npm i @julytian/tinypng-cli -g

# via yarn
yarn i @julytian/tinypng-cli -g

# via pnpm
pnpm i @julytian/tinypng-cli -g

Usage

$ tinypng <file> [options]
# Help info
$ tinypng --help
# Compress image
$ tinypng xxx.png
# Compress images and generate zip format packages
$ tinypng xxx.png -z
# Compress all images in directory
$ tinypng xxx目录
# Compress all images in directory and generate zip format packages
$ tinypng xxx目录 -z
# Unzip the zip file and compress all the images inside
$ tinypng xxx.zip
# Unzip the zip file and compress all the images inside and generate zip format packages
$ tinypng xxx.zip -z