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

cloud-images-toolkit

v1.3.2

Published

CIT - Cloud Images Toolkit for web developers. Manage image collections with CDN sync, adaptive embed code, and interactive widget generation.

Readme

npm version License: MIT

CIT - Cloud Images Toolkit

A powerful toolkit for managing image collections directly in your codebase, with CDN integration and advanced features.

CIT Dashboard screenshot

Features

  • Automatic synchronization between local images and CDN
  • Git-based image collection data tracking and collaboration
  • Flat structured cloud data to local folders mapping
  • Automatic image sorting for ordered sequences
  • Adaptive image embed code generation
  • Smart local caching - download cloud images only when needed
  • Built-in image management UI application with drag-and-drop uploads
  • Interactive widget generation using Immersive Media Spots (IMS):
    • Image galleries
    • Panorama viewers
    • 360° object views
    • And more...
  • Multi-CDN support with built-in connectors:
  • Custom CDN endpoints via URL templates
  • Data-to-image encoding for the uniform asset control workflow (store your widgets data directly in image CDN)

Coming soon

  • Video publishing & video collections view
  • Advanced IMS-based hypermedia composer
  • Built-in AI image generation support and prompt editor
  • Image modifications and transformations:
    • Watermarks
    • Filters
    • Cropping
    • Rotating
  • Additional tag-based grouping and filtering

Requirements

  • Node.js 20.0.0+
  • npm 10.0.0+

Quick Start

Run without installing:

npx cloud-images-toolkit

If no config file is found, CIT will offer to create one from the reference template.

Installation

Global installation

npm install -g cloud-images-toolkit

Then run from any project directory:

cit

Local installation

npm install cloud-images-toolkit

Add a script to your package.json:

"scripts": {
  "cit": "node ./node_modules/cloud-images-toolkit/src/node/serve.js"
}

Then:

npm run cit

Configuration

Create a cit-config.json file in your project root. A reference template is included in the package as cit-config_REFERENCE.json:

{
  "name": "My Collection",
  "cdn": "cloudflare",
  "syncDataPath": "./cit-sync-data.json",
  "imsDataFolder": "./ims-widgets/",
  "imsDataMinify": true,
  "imgSrcFolder": "./cit-store/",
  "apiKeyPath": "./CIT_API_KEY",
  "projectId": "<YOUR_PROJECT_ID>",
  "imgUrlTemplate": "https://<YOUR_DOMAIN>/images/{UID}/{VARIANT}",
  "previewUrlTemplate": "https://<YOUR_DOMAIN>/images/{UID}/{VARIANT}",
  "imsUrlTemplate": "https://<YOUR_DOMAIN>/ims/{HASH}.json",
  "variants": ["120", "320", "640", "860", "1024", "1200", "2048", "max"],
  "imgTypes": ["png", "jpg", "jpeg", "webp", "gif", "svg"],
  "wsPort": 8080,
  "httpPort": 8081
}

Multi-Collection Support

CIT supports managing multiple collections simultaneously. Instead of a single object, you can configure cit-config.json as an array of collection objects. Each collection will operate independently with its own CDN settings, keys, and paths. A reference for this format can be found in cit-config_MULTI_REFERENCE.json.

When the cdn field is set, CIT uses a built-in connector that auto-fills upload, fetch, and remove URL templates with provider-specific defaults. You can still override any template manually.

To use custom URLs for your images, you need to enable this feature and configure it in your service provider dashboard.

Important: Add your image folder and API key file to .gitignore:

cit-store/
CIT_API_KEY
cit-config.json

URL Template Syntax

CIT uses specific macros in URL templates to dynamically construct paths. These macros are automatically replaced with runtime values:

  • {UID} — The unique identifier of the image (typically the CDN ID).
  • {VARIANT} — The specific variant string requested (e.g., 320, public).
  • {PROJECT} — Your configured projectId (e.g., Cloudflare Account ID, Cloudinary Cloud Name).
  • {HASH} — The MD5 hash used in the imsUrlTemplate to identify an Interactive Media Spot (IMS) descriptor file.

CDN Connectors

CIT includes built-in connectors for popular image CDN providers. Set the cdn field in your config to activate a connector.

Cloudflare Images

{ "cdn": "cloudflare", "projectId": "<ACCOUNT_ID>" }

API key file (CIT_API_KEY): your Cloudflare Images API Bearer token.

Variants: must be pre-created in your Cloudflare Images dashboard. Use custom domains for custom image URLs.

Cloudinary

{ "cdn": "cloudinary" }

API key file (CIT_API_KEY): three values separated by colons:

cloud_name:api_key:api_secret

The projectId is auto-extracted from the cloud name. Variants map to Cloudinary's URL-based width transformations (e.g. variant 320w_320,c_fit,f_auto,q_auto).

ImageKit

{ "cdn": "imagekit" }

API key file (CIT_API_KEY): two values separated by a colon:

private_key:url_endpoint

Example: your_private_key:https://ik.imagekit.io/your_id

Variants map to ImageKit's URL-based transformations (e.g. variant 320tr:w-320).

Bunny.net

{ "cdn": "bunny" }

API key file (CIT_API_KEY): three values separated by colons:

storage_password:storage_zone:pull_zone_url

Example: your-password:my-zone:https://my-zone.b-cdn.net

Variants map to Bunny Optimizer query parameters (e.g. variant 320?width=320). Make sure Bunny Optimizer is enabled on your pull zone.

Custom / No Connector

Omit the cdn field and provide all URL templates manually. CIT will use Bearer auth with the raw API key:

{
  "projectId": "<YOUR_PROJECT_ID>",
  "imgUrlTemplate": "https://...",
  "uploadUrlTemplate": "https://...",
  "fetchUrlTemplate": "https://...",
  "removeUrlTemplate": "https://..."
}

Variants

Variants are very important part of the CIT workflow. They are necessary for the adaptive image embed code generation and image size control. CIT uses the convention of the variant names to generate the image URLs, based on the image width.

For example, if you have a variant named 120, CIT will generate the URL for the image with the width of 120px.

It's a good practice to create variants for the screens with different DPI. For example, you can create a variant for the image with the width of 120 and the DPI of 1.0, and another variant for the image with the width of 240 and the DPI of 2.0.

For Cloudflare Images, variants must be pre-created in the Cloudflare dashboard. For Cloudinary, ImageKit, and Bunny.net, variants are applied dynamically via URL-based transformations.

Troubleshooting

Config not found

CIT looks for cit-config.json in the current working directory. Make sure you're running the command from your project root. When run without a config, CIT will offer to create one from the reference template.

API key errors

Ensure your API key file path in cit-config.json points to a valid file. The file format depends on your CDN connector — see the CDN Connectors section for details.

Port conflicts

If manually pre-configured ports (like 8080 or 8081) are already in use by other applications, update wsPort and httpPort in your config file to use different ports. Alternatively, you can omit these properties from your configuration, and CIT will automatically discover and bind to available network ports.

Upload failures

CIT automatically retries failed uploads up to 3 times. Check your API key and network connection if uploads consistently fail.

License

MIT License © rnd-pro.com