URL-driven image processing for Node.js.
imgx — image processing shaped by a URL
Resize, crop, watermark, convert — all expressed as a readable path, powered by sharp, and ready to drop into any Node.js project.
npm install @imgx-kit/coreGet started · Works with Node.js 18+, ESM and CJS
Core features
- URL-driven — Compatible with Aliyun OSS x-oss-process syntax
- Chained builder — TypeScript-friendly with full IDE auto-completion
- 12+ operations — Resize, crop, rotate, watermark, format conversion, quality control, and more.
- Powered by sharp — Battle-tested libvips backend with stable performance
Usage examples
Two ways to drive the same engine — pick whichever reads better in your codebase.
URL style
import { processImage } from '@imgx-kit/core';
const buf = await processImage(
'./photo.jpg',
'image/resize,w_300/format,webp',
);Builder style
import { imgx } from '@imgx-kit/core';
const buf = await imgx('./photo.jpg')
.resize({ w: 300 })
.format({ type: 'webp' })
.toBuffer();Visual comparison
The same input image, three different parameter strings:
Resize to width 300
image/resize,w_300Circle avatar
image/resize,w_200,h_200,m_fill/circle,r_100Add text watermark
image/resize,w_400/watermark,text_SGVsbG8sd_t_50,g_se