JavaScript Image Manipulation Program
An image processing library for Node and the browser written entirely in JavaScript, with zero native dependencies
npm install jimpJimp 2.0 needs Node.js 22 or later.
import { Jimp } from "jimp";
const image = await Jimp.read("test.png");
image.resize({ w: 256 });
await image.write("test-small.png");Methods like resize only change the image in memory, so call write (or getBuffer) to save the result. To start from a blank image, use new Jimp({ width, height, color }). To load an image you already have in memory, use await Jimp.fromBuffer(buffer). See Getting Started.
Read the full docs. Upgrading? See the v2 migration guide if you're on 1.x, or the v1 migration guide if you're on v0.
If you want to extend jimp or omit types or functions, create a custom Jimp with createJimp from @jimp/core. See the Custom Jimp guide.
- Add file-types or switch encoder/decoders
- Add or remove plugins (image manipulation methods)
Please read the CONTRIBUTING documentation.
To report a vulnerability, please follow the security policy. Don't open a public issue.
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!