v0.1.9 · MIT · 70 tests passing

Image processing
for the modern stack

Compress JPEG to WebP in one line. Convert formats, remove backgrounds, upscale — chainable API for Node.js and the browser.

Get Started →Try Playground
3.5MB JPEG60KB WebP|98% smaller|one method call
example.ts
import { img } from 'imgcraft'

// Smart compression — auto WebP at 80% quality
const small = await img('photo.jpg')
  .compress({ quality: 80 })
  .toBuffer()

// Compress to a specific format
const avif = await img('photo.jpg')
  .compress({ format: 'avif', quality: 60 })
  .toBuffer()

// Resize then compress — chain any transforms
const thumb = await img('photo.jpg')
  .resize(800)
  .compress({ format: 'webp', quality: 85 })
  .toBuffer()
import { img } from 'imgcraft'

// Smart compression — auto WebP at 80% quality
const small = await img('photo.jpg')
  .compress({ quality: 80 })
  .toBuffer()

// Compress to a specific format
const avif = await img('photo.jpg')
  .compress({ format: 'avif', quality: 60 })
  .toBuffer()

// Resize then compress — chain any transforms
const thumb = await img('photo.jpg')
  .resize(800)
  .compress({ format: 'webp', quality: 85 })
  .toBuffer()
Compression
Smart compress to WebP, AVIF, JPEG. Pick quality and format in one call.
Node + Browser
One API, runs everywhere. Sharp for Node, WASM for browser.
AI Built-in
Background removal, smart crop, upscale. No API key, runs locally.
Chainable API
Compose transforms like sentences. Readable, typed, predictable.
Format Convert
JPEG, PNG, WebP, AVIF — one method, full per-format options.
Batch Ready
Process thousands of images with concurrency control.
Color & Filters
Blur, sharpen, grayscale, tint, brightness, contrast, saturation.
Compositing
Overlay images, add watermarks, alpha compositing.
Metadata
Read width, height, format, EXIF. Strip metadata in one call.
REST API
Hosted — POST image, get result. Interactive docs included.
imgcraft-api.imgcraft.workers.dev/docs
70 tests passing·Node + Browser·MIT License·Zero config·< 100KB core

Install

$npm install imgcraft