1.0.0 • Published 4 years ago

evo-image-resizer v1.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

An image resize tool

Resize image but keep the ratio and save

Install

$ npm install evo-image-resizer

How to use

const path = require('path')
const imageResizer = require('evo-image-resizer')

const imageFolderPath = path.join(__dirname, 'images')
imageResizer(imageFolderPath, '300')

API

imageResizer (Directory, width)

Resize all images in the directory into the given width. Save all new images into {Directory}/result-images.

Directory

A valid directory containing all images that need to be resized Type: String

width

the width images would be resized to. The ratio of height and width of each image would remain the same. Type: Number