node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »



A node library to resize images using ImageMagick

you need ImageMagick on your system


You need imagemagick on your machine.

For Windows - download the ImageMaigck Installer

For Linux:

$ sudo apt-get install imagemagick


Resize a folder of images and write to a new folder.

Each image is resized multiple times.

var resize = require('imagemagickresizer')()
resize.folder('./imgs', './output', [{
}], function(){
    console.log('images resized!');

Resize a single image and control what size the output is written at:

resize.image('./imgs/balloon.jpg', './output/balloon.jpg', {
}, function(err){
    console.log('image is resized')

If ./imgs was a folder with:

  • image1.png (2048 x 1536)
  • image2.png (2048 x 1536)

Then ./output would contain:

  • image1.png (1024 x 768)
  • image1.thumb.png (102 x 77)
  • image2.png (1024 x 768)
  • image2.thumb.png (102 x 77)


$ npm install imagemagickresizer