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 install jimp
yarn add jimp
pnpm add jimp
Import
import Jimp from 'jimp';
Quick Example
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
| Package | jimp |
| Category | File System |
| Weekly Downloads | 1.5M+ |
| License | MIT |
| Install | npm install jimp |
Related Packages
Sharp is the highest-performance Node.js image processing library, using the libvips image processin…
Multer is a Node.js middleware for handling multipart/form-data, which is primarily used for uploadi…
pdf-lib is a library for creating and modifying PDF documents in any JavaScript environment, working…
Formidable is a Node.js module for parsing form data, especially file uploads. Unlike Multer which i…
Browse npm Packages by Category
Explore our reference of 200 popular npm packages with install commands, examples, and quick-start guides.