Socket
Socket
Sign inDemoInstall

gulp-jimp-wrapper

Package Overview
Dependencies
103
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gulp-jimp-wrapper

Manipulates images using Jimp.


Version published
Weekly downloads
10
decreased by-52.38%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

gulp-jimp-wrapper

Manipulates images using Jimp.

npm Travis CI Codecov Libraries.io dependency status for latest release Renovate enabled

Install

npm install --save-dev gulp-jimp-wrapper

Usage

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

import jimp from 'gulp-jimp-wrapper'

API

type Callback = (image: Jimp ) => Jimp
interface Options = { basename?: string, extname?: string }

declare const gulpJimp: (cb: Callback, opts?: Options) => stream.Transform

See 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 © 2020 Exuanbo

Keywords

FAQs

Last updated on 18 Nov 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc