Jimp is a comprehensive image processing library for Node.js, written entirely in JavaScript with zero native dependencies. It enables various image manipulation tasks such as resizing, cropping, color adjustments, and format conversions without external binaries. The current stable version is 1.6.1, reflecting an active development and release cadence with multiple patch and minor versions in recent months. Key differentiators include its pure JavaScript implementation, which ensures high portability across diverse environments, and a modular plugin architecture for customized builds. Jimp supports a wide range of formats, including JPEG, PNG, BMP, TIFF, and GIF, making it a versatile choice for server-side image processing workflows.
npm install jimpVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to read an image, perform common manipulations like resizing, converting to grayscale, adding text, and saving the output to a new file. It includes basic error handling and uses modern ESM syntax.
Initialize Jimp with desired plugins: `import Jimp from 'jimp/browser'; import { blur } from '@jimp/plugin-blur'; const customJimp = Jimp.extend(blur); await customJimp.read(...)` or `import { Jimp } from 'jimp'; Jimp.extend(blur);`Review existing code using `brightness` and adjust the numeric argument (e.g., a previous `0.5` might now be `1.5` for similar brightening, or `0.5` for dimming).
For new projects, prefer `import { Jimp } from 'jimp';` and rely on modern bundlers to pick up the correct export. If issues persist in a browser context, consider `import Jimp from 'jimp/browser';` or refer to your bundler's configuration.Always use `import { Jimp } from 'jimp';` and `await` for asynchronous operations like `Jimp.read` and `image.write`.Change `const { Jimp } = require('jimp');` to `import { Jimp } from 'jimp';`.Ensure you are using the named import: `import { Jimp } from 'jimp';`.Always `await` asynchronous Jimp operations, especially `Jimp.read()`: `const image = await Jimp.read('path/to/image.png');`No dependency data recorded yet.