npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

webp-cli-convert

v3.0.0

Published

Zero-fuss CLI to convert images (JPG, PNG, GIF, TIFF, AVIF, BMP) to WebP, with an interactive folder browser and options wizard

Readme

webp-cli-convert

npm version CI License: MIT

Zero-fuss CLI to convert images to WebP. Features an interactive folder browser with an options wizard, or direct conversion via flags.

Originals are kept by default — use --delete-originals to remove them.

Install

# Global install
npm install -g webp-cli-convert

# Or run without installing
npx webp-cli-convert

Usage

Interactive mode

Run without arguments to open the folder browser and options wizard:

webp-cli-convert

The interactive mode lets you:

  1. Browse your filesystem with arrow keys
  2. Select a folder or individual image
  3. Configure quality, lossless mode, originals, recursive, and output directory
  4. Review a confirmation summary before converting

Direct conversion

# Convert a single file
webp-cli-convert photo.jpg

# Convert all images in a folder
webp-cli-convert ./images

# Adjust quality
webp-cli-convert -q 85 ./images

# Custom output directory
webp-cli-convert -o ./dist/img ./src/assets

# Lossless (larger file, zero quality loss)
webp-cli-convert --lossless logo.png

# Recursive + delete originals
webp-cli-convert -r --delete-originals ./src/assets

Options

| Flag | Short | Default | Description | |------|-------|---------|-------------| | --quality <n> | -q | 90 | WebP quality, integer 1–100 | | --output <dir> | -o | source dir | Output folder | | --suffix <text> | -s | "" | Suffix added to output filename | | --recursive | -r | false | Process subfolders | | --delete-originals | | false | Delete source files after conversion | | --lossless | | false | Lossless compression (overrides --quality) | | --force | -f | false | Reconvert even if .webp already exists | | --help | -h | | Show help |

Supported formats

JPG · JPEG · PNG · GIF · TIFF · TIF · AVIF · BMP

Migrating from v1

v2 introduces two breaking changes:

  • Originals are kept by default. In v1 originals were always deleted. To restore the old behavior use --delete-originals.
  • Node.js ≥ 20.3.0 is required (v1 required ≥ 18).

The deprecated -k / --keep-original flag is still accepted but prints a warning and does nothing (originals are already kept).

Requirements

  • Node.js ≥ 20.3.0
  • sharp is the only runtime dependency

Contributing

See CONTRIBUTING.md.

License

MIT