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

kru-webp

v1.0.4

Published

`webp` is a command-line tool to streamline the process of converting images to the [WebP graphics file format](https://en.wikipedia.org/wiki/WebP) in a pipeline.

Readme

webp

webp is a command-line tool to streamline the process of converting images to the WebP graphics file format in a pipeline.

[!NOTE] This has been developed for personal use. Features have only been implemented as and when required. If you have a specific use-case not covered by the current implementation, please open an issue or submit a pull request.

Installation

# Install bun
curl -fsSL https://bun.sh/install | bash

# Install ffmpeg
sudo apt install ffmpeg

# Install exiftool
wget https://exiftool.org/Image-ExifTool-12.77.tar.gz
gzip -dc Image-ExifTool-12.77.tar.gz | tar -xf -
cd Image-ExifTool-12.77
perl Makefile.PL
sudo make install
rm -rf Image-ExifTool-12.77.tar.gz Image-ExifTool-12.77

# Install webp
bun install kru-webp --global

Parameters

| Parameter | Description | Default | Example | | --- | --- | --- | --- | | ext | Only include files with these extensions | all files | ext=.jpg/.png | | out | Output directory | input directory | out=/path/to/output | | lossless | Enable lossless compression | disabled | lossless | | compression | Compression level for lossless compression | 6 | compression=0 | | quality | Quality level for lossy compression | 75 | quality=100 | | scale | Resize the image by scale factor | 1 | scale=0.5 | | width | New image width | source width | width=960 | | height | New image height | source height | height=540 | | crop | Crop instead of resize | disabled | crop | | centerh | Center the crop horizontally | disabled | centerh | | centerv | Center the crop vertically | disabled | centerv | | center | centerh + centerv | disabled | center | | verbose | Enable verbose output | disabled | verbose |

Usage

# Convert a PNG image
webp image.png

# Convert a directory of files
webp /path/to/directory

# Convert a directory of files with extension filter
webp /path/to/directory ext=.jpg/.png # jpg and png only

# Output files in a different directory
webp /path/to/directory out=/path/to/output

# Enable lossless compression (default is lossy)
webp image.png lossless

# Compression level for lossless compression (default is 6)
webp image.png compression=0 # fast but large

# Quality level for lossy compression (default is 75)
webp image.png quality=100 # best quality

# Resize the image by scale factor
webp image.png scale=0.5 # scale the image to 50%

# Specify new image dimensions (resizes the image)
webp image.png width=960 height=540
webp image.png width=960 # height is automatically calculated to maintain aspect ratio
webp image.png width=960 height=source # source height is kept

# Crop image instead of resize
webp image.png width=500 height=500 crop
webp image.png width=500 height=500 crop center # center the crop
webp image.png width=500 height=500 crop centerh # center the crop horizontally