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/core

Get started · Works with Node.js 18+, ESM and CJS

Core features

  • URL-drivenCompatible with Aliyun OSS x-oss-process syntax
  • Chained builderTypeScript-friendly with full IDE auto-completion
  • 12+ operationsResize, crop, rotate, watermark, format conversion, quality control, and more.
  • Powered by sharpBattle-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

Resize to width 300

image/resize,w_300
Circle avatar

Circle avatar

image/resize,w_200,h_200,m_fill/circle,r_100
Add text watermark

Add text watermark

image/resize,w_400/watermark,text_SGVsbG8sd_t_50,g_se

imgx is powered by sharp and libvips.