@chubkey/compress
TypeScript icon, indicating that this package has built-in type declarations

2.4.2 • Public • Published

Compress

A lightweight CLI tool for compressing image files and converting them to the webp format. Built on top of the imagemin library with added functionality such as preserving folder structure.

Installation

npm install -g @chubkey/compress

Usage

Once installed, the CLI tool can be used by typing compress into a terminal.

Options

The library comes with a couple configuration flags used to direct the tool to your needs. Options should always come before the input/output directory.

Format: compress [options] <inputDir> <outputDir>

Option Description
--quality=<quality> Configures quality of lossy output (default=75)
--webp Enables webp conversion
--lossless Use loseless over lossy compression

Examples

compress images compressed_images

compress --quality=85 --webp images compressed_images

compress --lossless images compressed_images

License

This libary uses the MIT License.

Package Sidebar

Install

npm i @chubkey/compress

Weekly Downloads

1

Version

2.4.2

License

MIT

Unpacked Size

320 kB

Total Files

35

Last publish

Collaborators

  • chubkey