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 🙏

© 2025 – Pkg Stats / Ryan Hefner

imgshift

v1.0.1

Published

CLI utility to slightly alter image assets to change their checksums while keeping visual changes imperceptible

Downloads

5

Readme

Alternate Assets

A CLI utility to slightly alter image assets to change their checksums while keeping visual changes imperceptible.

Installation

Option 1: Use with npx (no installation required)

npx imgshift <path> [flags]

Option 2: Install from npm globally

npm install -g imgshift

Option 3: Install from source (Go)

go install github.com/sincerely-manny/imgshift@latest

Option 4: Clone and build locally

git clone https://github.com/your-username/imgshift.git
cd imgshift
go build

Usage

# If installed via Go or built locally
imgshift <path> [flags]

# With npx (no installation)
npx imgshift <path> [flags]

Arguments

  • <path>: Path to the image file or directory to process

Flags

  • -r, --recursive int: Process directories recursively up to specified depth (default: 0)
  • -v, --verbose: Display detailed information about the operations
  • -h, --help: Help for imgshift

Supported Image Formats

  • JPEG (.jpg, .jpeg)
  • PNG (.png)
  • GIF (.gif)
  • WebP (.webp)

Examples

Process a single image:

imgshift path/to/image.jpg
# or with npx (no installation required)
npx imgshift path/to/image.jpg

Process all images in a directory (non-recursively):

imgshift path/to/directory
# or with npx (no installation required)
npx imgshift path/to/directory

Process images recursively with a maximum depth of 3:

imgshift path/to/directory -r 3
# or with npx (no installation required)
npx imgshift path/to/directory -r 3

Show detailed information:

imgshift path/to/image.png -v
# or with npx (no installation required)
npx imgshift path/to/image.png -v

How It Works

The tool creates imperceptible changes to images by:

  1. Applying a very subtle brightness adjustment (0.1%) to the image
  2. For JPEGs: Estimating the original quality and applying a minimal change (±1 quality level)
  3. For PNGs: Detecting file characteristics and selecting an appropriate compression level
  4. For other formats: Using the imaging library's default encoding

These changes are enough to alter the file's checksum while maintaining the original quality and avoiding visible artifacts or quality degradation.

Building and Publishing

Building for Distribution

This project includes scripts for building cross-platform binaries:

# Build for all platforms (macOS, Linux, Windows)
npm run build:go

# Build and package for npm
npm run build:all

The build script creates binaries for multiple platforms and architectures:

  • macOS (amd64, arm64)
  • Linux (amd64, arm64)
  • Windows (amd64)

npm Package Structure

The npm package includes:

  • A JavaScript wrapper that detects the user's platform and architecture
  • Pre-compiled binaries for all supported platforms
  • No post-install scripts or runtime dependencies

This approach ensures a smooth user experience with no compilation steps required during installation.

Publishing to npm

After building all binaries:

npm run publish:npm

This will publish the npm package with pre-compiled binaries for all supported platforms.

License

MIT