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

@image-kit/core

v2.0.9

Published

A lightweight and performant image processing wrapper for the browser.

Readme

@image-kit/core 🖼️

A lightweight and performant image processing wrapper for the browser. Built using native browser APIs like Canvas, HTMLImageElement, and WebCodecs, this library provides a powerful yet minimal interface to perform real-time image transformations such as resizing, format conversion, quality tuning, and more.

✨ Features

  • 🪶 Minimal footprint
  • 💨 Fast performance via native browser APIs
  • 🧩 Chainable API for better readability
  • 🎨 Resize, format, sharpen, compress, and transform with ease
  • 🧪 Converts final result to Blob, Base64, or ImageBitmap

📦 Installation

npm install @image-kit/core
# or
yarn add @image-kit/core
# or
pnpm add @image-kit/core

🚀 Usage

import { image, thumbnail } from "@image-kit/core";

const src = "https://example.com/image.jpg";
const height = 200;
const aspectRatio = 16 / 9;

const transformedImage = image(`${src}?${Date.now()}`)
  .format("auto")
  .quality(1)
  .resize(thumbnail().height(height).aspectRatio(aspectRatio))
  .sharpen(1)
  .algorithm("multistep");

const blob = await transformedImage.toBlob();

🔧 API Reference

image(src: string)

Initializes image processing with the provided image source.

.format(format: 'auto' | 'jpeg' | 'webp' | 'png')

Automatically choose optimal format or specify it manually.

.quality(value: number)

Set the image quality (0-1).

.resize(config: ResizeConfig)

Resize the image using configuration (supports width, height, and aspectRatio).

.sharpen(value: number)

Sharpens the image. 1 is typically a safe default.

.algorithm(name: 'default' | 'multistep')

Chooses resizing algorithm.

.toBlob()

Returns a Blob of the transformed image.

.toBase64()

Returns a base64 data URL.

.toImageBitmap()

Returns an ImageBitmap.


🧱 Resize Utilities

thumbnail()

Returns a predefined ResizeConfig that simplifies resizing logic for thumbnails.

Example:

resize(thumbnail().height(300).aspectRatio(16 / 9))

🧪 Browser Support

| Feature | Supported Browsers | | ----------- | ---------------------------------- | | Canvas | ✅ Chrome, Firefox, Safari, Edge | | WebCodecs | ✅ Chrome, Edge (Partial in Safari) | | ImageBitmap | ✅ Most modern browsers |


🧠 Philosophy

Less dependency, more browser power. Use what the platform gives you. This library is for those who want fast, predictable image processing without third-party bloat.


🤝 Contributing

Pull requests and issues are welcome! Please open a discussion if you'd like to propose a significant feature or change.

git clone https://github.com/sundarshahi/image-kit-core.git
cd image-kit-core
npm install

📜 License

MIT © Sundar Shahi Thakuri