jimp-compact
Version:
Compact version of Jimp
45 lines (29 loc) • 1.61 kB
Markdown
# ✏️ Jimp Compact
<!-- [](#) -->
<!-- [](https://circleci.com/gh/unjs/jimp-compact) -->
[](https://www.npmjs.com/package/jimp-compact)
[](https://www.npmjs.com/package/jimp-compact)
[](https://packagephobia.now.sh/result?p=jimp-compact)
> Lightweight version of [Jimp](https://github.com/oliver-moran/jimp) compiled with [vercel/ncc](https://github.com/vercel/ncc)
## Why?
This package has **27x** smaller install size with **all** features of original jimp (Jimp install size is [~33.8MB](https://packagephobia.now.sh/result?p=jimp)) by bundling all `node_modules` and removing extra files.
## Usage
Install and import/require `jimp-compact` instead of `jimp` npm package.
```sh
# npm
npm i jimp-compact
# yarn
yarn add jimp-compact
```
```js
// ESM
import Jimp from 'jimp-compact'
// CJS
const Jimp = require('jimp-compact')
```
See [jimp docs](https://github.com/oliver-moran/jimp/tree/master/packages/jimp) for full usage.
## Known Issues
In order to make typescript working, you need to (also) install `jimp` in `devDependencies`!
Track issue via [#39](https://github.com/unjs/jimp-compact/issues/39) and [#42](https://github.com/unjs/jimp-compact/issues/52).
## License
MIT - Based on [Jimp](https://github.com/oliver-moran/jimp/blob/master/LICENSE)