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

croppix

v2.2.1

Published

[![Docker Pulls](https://img.shields.io/docker/pulls/asterixcapri/croppix)](https://hub.docker.com/r/asterixcapri/croppix) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://www.tldrlegal.com/license/mit-license) [![GitHub stars]

Downloads

466

Readme

Croppix

Docker Pulls License: MIT GitHub stars

Croppix is an image processing service built on Sharp and Amazon Rekognition. It generates cropped and optimized images from URL parameters and stores cached results on S3.

csmart supports two engines:

  • attention: simplest setup, no Rekognition needed
  • rekognition: subject-aware smart crop with label detection and face refinement

For the full detection flow, see SMART_CROP.md.

How It Works

Browser
  ↓
CloudFront
  ├─ cache hit on S3 cache bucket → serve image
  └─ cache miss → Croppix
                  ├─ read source from S3
                  ├─ transform image
                  ├─ save result to S3 cache
                  └─ return image

Try It Locally

This is the simplest way to test Croppix locally.

Requirements

  • Docker
  • AWS credentials with access to your S3 buckets
  • one source bucket: AWS_BUCKET
  • one cache bucket: AWS_BUCKET_CACHE

If you want the easiest first run, use SMART_CROP_ENGINE=attention.

Run

docker run -p 3003:3003 \
  -e AWS_ACCESS_KEY_ID=xxx \
  -e AWS_SECRET_ACCESS_KEY=xxx \
  -e AWS_REGION=us-east-1 \
  -e AWS_BUCKET=your-source-bucket \
  -e AWS_BUCKET_CACHE=your-cache-bucket \
  -e SMART_CROP_ENGINE=attention \
  asterixcapri/croppix:latest

Test Request

Request:

http://localhost:3003/photos/image123.jpg/w400_h300_csmart.webp

Expected behavior:

  • Croppix reads photos/image123.jpg from AWS_BUCKET
  • generates a 400x300 WebP
  • stores the result in AWS_BUCKET_CACHE
  • returns the generated image

The source image must exist in AWS_BUCKET at photos/image123.jpg.

If you want subject-aware smart crop and have Rekognition permissions configured, switch SMART_CROP_ENGINE to rekognition.

URL Format

A Croppix request looks like this:

https://your-croppix-domain.com/<image-path>/<transform-params>.<format>

Example:

https://your-croppix-domain.com/photos/image123.jpg/w400_h300_d2_csmart.webp

Supported parameters:

| Parameter | Description | |-----------|-------------| | w{width} | Width in pixels | | h{height} | Height in pixels | | s{shortSide} | Fit to the shortest side | | l{longSide} | Fit to the longest side | | c{crop} | Crop type | | q{quality} | Output quality | | d{density} | Retina scale factor | | u{updatedAt} | Cache busting timestamp | | .webp, .jpeg, .jpg | Output format |

Parameters can be combined with _ and used in any order.

Crop Modes

Croppix supports these values for c{crop}:

| Value | Description | |-------|-------------| | smart | Smart crop using attention or rekognition, depending on SMART_CROP_ENGINE | | none | No crop, keep full image with background fill | | entropy | Sharp entropy strategy | | attention | Sharp attention strategy | | center | Center crop | | top | Top crop | | bottom | Bottom crop | | left | Left crop | | right | Right crop | | leftTop | Top-left crop | | rightTop | Top-right crop | | leftBottom | Bottom-left crop | | rightBottom | Bottom-right crop |

More Docs

License

Distributed under the MIT license.