https://github.com/exuanbo/gulp-jimp-wrapper
Manipulates images using Jimp.
https://github.com/exuanbo/gulp-jimp-wrapper
gulp gulp-image gulpplugin image jimp
Last synced: 20 days ago
JSON representation
Manipulates images using Jimp.
- Host: GitHub
- URL: https://github.com/exuanbo/gulp-jimp-wrapper
- Owner: exuanbo
- License: mit
- Created: 2020-08-27T08:17:30.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-06-06T21:10:06.000Z (30 days ago)
- Last Synced: 2025-06-10T01:14:15.590Z (26 days ago)
- Topics: gulp, gulp-image, gulpplugin, image, jimp
- Language: JavaScript
- Homepage:
- Size: 349 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-jimp-wrapper
> Manipulates images using [Jimp](https://www.npmjs.com/package/jimp).
[](https://www.npmjs.com/package/gulp-jimp-wrapper)
[](https://travis-ci.com/github/exuanbo/gulp-jimp-wrapper)
[](https://codecov.io/gh/exuanbo/gulp-jimp-wrapper)
[](https://libraries.io/npm/gulp-jimp-wrapper)
[](https://renovatebot.com/)## Install
```bash
npm install --save-dev gulp-jimp-wrapper
```## Usage
```javascript
const { src, dest } = require('gulp')
const jimp = require('gulp-jimp-wrapper')exports.default = () => {
return src('./src/img/*')
.pipe(
jimp(image => image.resize(256, 256).quality(60).greyscale(), {
extname: '.min.png'
})
)
.pipe(dest('./dist/img'))
}
```or use ES module
```javascript
import jimp from 'gulp-jimp-wrapper'
```## API
```ts
type Callback = (image: Jimp ) => Jimp
interface Options = { basename?: string, extname?: string }declare const gulpJimp: (cb: Callback, opts?: Options) => stream.Transform
```See [jimp #methods](https://www.npmjs.com/package/jimp#methods) for the full documentation.
Note that `basename` option should only be used when `gulp.src()` takes in one single file.
Be careful with the `Jimp.write()` method.
## License
[MIT License](https://github.com/exuanbo/gulp-jimp-wrapper/blob/master/LICENSE) © 2020 [Exuanbo](https://github.com/exuanbo)