rizer
v1.1.0-alpha.0
Published
A CLI tool to resize images by width, height, or ratio
Maintainers
Readme
rizer
rizer is a lightweight CLI tool to resize images by width, height, or ratio, powered by sharp.
Update Notes
Division generation. Creates breakpoints based on width, height or ratio and no. of images to generate.
rizer picture.jpg -wc 4
# picture.jpg is 1920
# Generates 384, 768, 1152, 1536 widthContent
📦 Installation
1. As a Dev Dependency (local use in projects)
yarn add -D rizer
# or
npm install --save-dev rizerYou can then run it from your project scripts or with npx:
npx rizer input.jpg -w 320,6402. As a Global CLI (use from anywhere)
yarn global add rizer
# or
npm install -g rizerNow you can use it in any folder:
rizer input.jpg -r 0.25,0.5🛠️ Usage
rizer <image-path> [options]Examples
Resize by ratio (default if no options passed):
# Generates 0.25x, 0.5x, 0.75x versions
rizer photo.jpgWith custom options:
# Generates 0.25x, 0.5x versions
rizer photo.jpg -r 0.25,0.5Resize by width:
rizer photo.jpg -w 320,640Resize by height:
rizer photo.jpg -h 240,480Allow Upscaling:
rizer photo.jpg -w 1600 -uUse rizer --help help
