img-sizer
Take an image, get a bunch of sized images.
Useful for responsive images
Install
npm install --global img-sizer
Usage
img-sizer --help
Usage
$ img-sizer <files...> [...]
Options
--sizes Image sizes to generate
--quality Image quality [Default: 80]
--formats Additional Image Formats to Generate [Values: jpg,webp,png]
Examples
$ img-sizer photo1.jpg photo2.jpg --sizes=768
photo1-768.jpg photo2-768.jpg
$ img-sizer photo.jpg --sizes=1280,768
photo-1280.jpg photo-768.jpg
$ img-sizer photo.jpg --sizes=1280 --formats=jpg,webp
photo-1280.jpg photo-1280.webp
$ img-sizer *.jpg --sizes=1280
Dependencies
graphicsmagick - install on macOS with Homebrew:
brew install graphicsmagick
For webp support, include the webp option brew install graphicsmagick --with-webp
License
MIT © David Merrique