Skip to content

Releases: fhemberger/imagemin-gm

v2.0.3

02 Nov 08:34
Compare
Choose a tag to compare

chore: Update dependencies

v2.0.0: Pass path to GraphicsMagick binaries

31 Jan 09:49
Compare
Choose a tag to compare
  • use 'standard' style
  • update dependencies
  • BREAKING CHANGE: imagemin-gm needs now to be instantiated, to optionally pass gm binary path as Constructor option:
const imagemin = require('imagemin')
const ImageminGm = require('imagemin-gm')
const imageminGm = new ImageminGm()

const plugins = [
  imageminGm.resize({ width: 250, height: 250, gravity: 'Center' }),
  imageminGm.convert('jpg')
]

imagemin(['images/*.gif'], 'output', { use: plugins })
  .then(() => console.log('Images converted'))
  .catch(err => console.error(err))