
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
High-performance image processing for Bun and Node.js - resize, convert, compress with HEIC, WebP, AVIF, PNG, JPEG support
High-performance image processing for Bun and Node.js
Built with Rust and napi-rs for maximum speed
Performance
|
Features
|
bun add imgkit # Bun
npm install imgkit # npm
yarn add imgkit # Yarn
pnpm add imgkit # pnpm
import { resize, metadata, smartCrop, transform, thumbhash, toTensor } from 'imgkit';
const buf = Buffer.from(await Bun.file('photo.jpg').arrayBuffer());
const info = await metadata(buf); // Ultra-fast metadata
const resized = await resize(buf, { width: 200 }); // Resize
const thumb = await smartCrop(buf, { aspectRatio: '1:1' }); // Content-aware crop
const { dataUrl } = await thumbhash(buf); // Placeholder image
const webp = await transform(buf, { // Full pipeline
crop: { aspectRatio: '16:9' }, resize: { width: 1280 },
output: { format: 'webp', webp: { quality: 85 } }
});
const tensor = await toTensor(buf, { // ML-ready tensor
width: 224, height: 224, normalization: 'Imagenet', layout: 'Chw'
});
// Timeout & cancellation (all async functions)
const safe = await resize(buf, { width: 800 }, { timeoutMs: 5000 });
const ac = new AbortController();
await resize(buf, { width: 800 }, { signal: ac.signal });
| Function | Description | Async | Sync |
|---|---|---|---|
metadata() | Image dimensions, format, color info | ✅ | ✅ |
resize() | Resize with multiple algorithms | ✅ | ✅ |
crop() | Crop region (zero-copy) | ✅ | ✅ |
smartCrop() | Content-aware crop | ✅ | ✅ |
dominantColors() | Extract colors for UI theming | ✅ | ✅ |
thumbnail() | Fast thumbnail (shrink-on-load) | ✅ | ✅ |
transform() | Multi-operation pipeline | ✅ | ✅ |
toJpeg() / toPng() / toWebp() | Format conversion | ✅ | ✅ |
blurhash() / thumbhash() | Image placeholders | ✅ | ✅ |
toTensor() | ML tensor (SIMD-accelerated) | ✅ | ✅ |
imageHash() / imageHashDistance() | Perceptual hashing | ✅ | ✅ |
writeExif() / stripExif() | EXIF metadata | ✅ | ✅ |
All async functions support { timeoutMs?, signal? } for timeout & cancellation. All have sync variants (resizeSync(), etc.).
Formats: JPEG (TurboJPEG/SIMD), PNG, WebP, GIF, BMP, TIFF (read), HEIC/AVIF (macOS ARM64)
Platforms: macOS (ARM64, x64) · Linux (x64 glibc/musl, ARM64) · Windows (x64, ARM64)
git clone https://github.com/nexus-aissam/imgkit.git && cd imgkit
bun install && bun run build && bun run build:ts && bun test
FAQs
High-performance image processing for Bun and Node.js - resize, convert, compress with HEIC, WebP, AVIF, PNG, JPEG support
We found that imgkit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.