📂
File System1.5M+/wkMIT

jimp

Jimp (JavaScript Image Manipulation Program) is a pure JavaScript image processing library for Node.js that requires no native dependencies or compilation. Unli

Installation

npm
npm install jimp
yarn
yarn add jimp
pnpm
pnpm add jimp

Import

ESM
import Jimp from 'jimp';

Quick Example

usage
import Jimp from 'jimp';

const image = await Jimp.read('photo.jpg');
await image
  .resize(300, Jimp.AUTO)
  .quality(80)
  .greyscale()
  .writeAsync('output.jpg');

About jimp

Jimp (JavaScript Image Manipulation Program) is a pure JavaScript image processing library for Node.js that requires no native dependencies or compilation. Unlike Sharp which uses native C bindings for performance, Jimp is written entirely in JavaScript, making it easy to install on any platform without build tools (node-gyp, Python, C++ compiler). Jimp supports reading and writing JPEG, PNG, BMP, TIFF, and GIF formats, with operations including resize, crop, rotate, flip, blur, brightness, contrast, opacity, color manipulation, compositing, and text printing with bitmap fonts. The library provides a chainable API: Jimp.read('input.png').then(img => img.resize(256, 256).quality(80).write('output.jpg')). Jimp supports custom bitmap fonts for adding text to images and provides pixel-level access for custom operations through scan() and getPixelColor()/setPixelColor(). While Jimp is significantly slower than Sharp for large images and high-throughput scenarios, its zero-native-dependency approach makes it invaluable in environments where native module compilation is not possible — serverless functions, restricted CI environments, and WebAssembly contexts. Jimp is suitable for moderate image processing needs where installation simplicity is more important than raw performance.

Quick Facts

Packagejimp
CategoryFile System
Weekly Downloads1.5M+
LicenseMIT
Installnpm install jimp

Related Packages

Browse npm Packages by Category

Explore our reference of 200 popular npm packages with install commands, examples, and quick-start guides.