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

pico-img

v1.1.0

Published

Local-first image & video compressor & TinyPNG alternative — compress JPG, PNG, WebP, AVIF, TIFF & JXL locally. Video compression via ffmpeg.

Readme

Pico

A local-first image & video compressor for JPG, PNG, WebP, AVIF, TIFF, JPEG XL and video formats. Pico runs a small Express server on your machine, compresses everything with Sharp (ffmpeg for video), and shows the results in a terminal style web UI. Nothing is uploaded, there are no accounts, and nothing leaves your computer.

It exists because "free image compressor" usually means sending your photos to someone else's server. Pico does the same work offline.

npm version License: GPL-3.0 Node Stars Visitors Website

Built with

React Express Sharp Tailwind CSS GSAP Vite Node.js npm

GitHub Insights

Features

  • Compresses JPG, JPEG, PNG, WebP, AVIF, TIFF, JPEG XL and video (MP4, WebM, MOV, MKV, AVI), up to 200 MB per file and 30 files per batch
  • Uses mozjpeg for JPEG, compression level 9 with palette mode for PNG, tuned encoders for WebP/AVIF, LZW for TIFF, libjxl for JPEG XL, and libx264 + AAC for video
  • Quality control from 10 to 100, from tiny files to near-lossless
  • Shows original size, compressed size and savings for every file
  • Keeps the original format, respects EXIF orientation
  • Deletes temporary uploads automatically after processing
  • REST API if you prefer scripts over clicking

Requirements

  • Node.js 18.17 or newer
  • A browser, for the web UI

Installation

Run it once without installing:

npx pico-img

Or install it globally:

npm install -g pico-img
pico

The server starts on port 3000 and your browser opens automatically.

To work on the source code instead:

git clone https://github.com/MoHamed-B-M/pico.git
cd pico
npm install
npm run build
npm run dev

Usage

  1. Run pico in a terminal
  2. Drag your images into the upload card, or click to browse
  3. Pick a quality level. 10 gives the smallest files, 100 keeps the most detail
  4. Press compress and wait for the results
  5. Download what you need

Command line options

Usage: pico [options]

Options:
  -p, --port <number>   Port to serve on (default: 3000)
      --no-open         Do not auto-open the browser
  -v, --version         Show version number
  -h, --help            Show this help

How it works

flowchart LR
    A[Drop files] --> B[Multer temp store]
    B --> C{Route}
    C -->|image| D[Sharp]
    C -->|JXL| E[libjxl]
    C -->|video| F[ffmpeg]
    D -->|JPG| G[mozjpeg]
    D -->|PNG| H[level 9 + palette]
    D -->|WebP| I[effort 5]
    D -->|AVIF| J[effort 4]
    D -->|TIFF| K[lzw compression]
    E --> L[compressed folder]
    F --> L
    G --> L
    H --> L
    I --> L
    J --> L
    K --> L
    L --> M[JSON stats and downloads]
    B -. auto delete .-> N[cleanup]

Compression happens in-process through libvips (images) and ffmpeg (video). There are no workers, queues or external services involved.

Results you can expect

Measured on a 1600x1200 test image at quality 60:

| Format | Before | After | Saved | |--------|-------:|------:|------:| | JPG | 1.82 MB | 383 KB | 79% | | PNG | 113 KB | 18 KB | 84% |

API

Compress files with a POST request. The images field is repeatable, quality accepts an integer from 10 to 100.

curl -X POST -F "[email protected]" -F "quality=60" http://localhost:3000/api/compress

The response contains one entry per file:

{
  "success": true,
  "quality": 60,
  "files": [
    {
      "id": "d38c9894",
      "originalName": "photo.jpg",
      "downloadUrl": "/compressed/d38c9894__photo.compressed.jpg",
      "format": "JPG",
      "quality": 60,
      "originalSize": 1823679,
      "compressedSize": 383140,
      "savedPercentage": 79
    }
  ]
}

Files that fail are listed under failures and do not stop the rest of the batch. A health probe is available at GET /api/health.

Project structure

pico/
|-- server.js               Express server and Sharp pipeline
|-- vite.config.js          Vite config, client root
|-- client/
|   |-- index.html
|   |-- tailwind.config.js
|   +-- src/
|       |-- components/     Upload card, quality slider, results
|       |-- animations/     GSAP hooks
|       |-- tokens.css      Design tokens
|       +-- App.jsx
|-- uploads/                Temporary storage, auto cleaned
+-- compressed/             Output folder, served statically

Contributing

Pull requests are welcome. Fork the repo, make your changes, and open a PR. Some ideas that would be nice: resize presets, a CLI-only batch mode, GIF support, a Docker image.

License

This project is licensed under the GNU General Public License v3.0. See LICENSE for details.

Author

Made by Hamma, IT student.

Gmail GitHub

Disclaimer: TinyPNG is a registered trademark of Tinify B.V. Pico is an independent, open-source project and is not affiliated with or endorsed by Tinify.