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

@pictwo/images

v1.1.0

Published

Portable Pictwo image asset package (originals + generated variants + manifest).

Downloads

511

Readme

@pictwo/images

@pictwo/core @pictwo/faker @pictwo/images Release Run Tests

The portable Pictwo image asset package: category originals, generated variants, and a deterministic manifest.json. Consumed by @pictwo/core via the jsdelivr and local providers, and syncable into the hosted API's storage.

pnpm add @pictwo/images

Layout

images/
  avatar/   original/  [400x400/  …]
  fashion/  original/  [400x400/  …]
  fabric/   original/  [400x400/  …]
  product/  original/  [400x400/  …]
  design/   original/  [400x400/  …]
manifest.json
  • original/ holds the source images.
  • {width}x{height}/ folders hold generated variants (default webp).
  • manifest.json describes everything and powers static URL generation.

Manifest shape

{
  "version": 1,
  "categories": {
    "fashion": {
      "original": ["model-001.jpg", "model-002.jpg"],
      "variants": {
        "400x400": ["model-001.webp", "model-002.webp"]
      }
    }
  }
}

Workflows (run from the repo root)

# 1. Drop originals into packages/pictwo-images/images/{category}/original/

# 2. Generate scaled variants (Sharp)
pnpm pictwo:images:generate
pnpm pictwo:images:generate -- --sizes avatar,card,cover --only fashion,fabric
pnpm pictwo:images:generate -- --format webp --quality 82 --force

# 3. Build the manifest
pnpm pictwo:images:manifest

# generate + manifest in one step
pnpm pictwo:images:build

# 4. Sync originals into the hosted API storage (storage/app/public/images)
pnpm pictwo:images:sync
pnpm pictwo:images:sync -- --only fashion --dry-run

# 5. Reclaim space — remove generated variant folders
pnpm pictwo:images:clean
pnpm pictwo:images:clean -- --dry-run
pnpm pictwo:images:clean -- --base-dir storage/app/public/images

Syncing to the hosted app

pnpm pictwo:images:sync flattens each images/{category}/original/* into storage/app/public/images/{category}/*. The hosted app treats every sub-folder of images/ as a category, so flattening keeps its image discovery working unchanged. Generated variant folders are not synced — the hosted API resizes at runtime.

Using the assets

import { createPictwo } from '@pictwo/core';
import manifest from '@pictwo/images/manifest.json';

// jsDelivr CDN
const cdn = createPictwo({
  source: {
    driver: 'jsdelivr',
    packageName: '@pictwo/images',
    version: '1.0.0',
  },
  manifest,
});

// Local static files
const local = createPictwo({
  source: { driver: 'local', baseUrl: '/pictwo/images' },
  manifest,
});