Pyper
The uncomplicated image resizing pipeline.
Features
•
Usage
•
Development
•
License
Features
- 📄 Supports any image type supported by sharp/libvips
- 📏 Multiple input rules each with multiple outputs
- ✳️ Glob input file selection
- 🚀 Fast resizing with sharp/libvips
- 👀 Skips already-resized images with a cache for fast subsequent runs
Usage
Usage: pyper [options]
Options:
-v, --version output the current version
--verbose output debugging
-h, --help display help for command
Create a .pyper.json
file in the folder you want to run pyper from.
Here's one that creates three different versions of each of the images in the images
folder.
[
{
"input": "images/*",
"outputs": [
{
"path": "output/{basepath}/{filename}-35{extension}",
"width": 35,
"height": 35
},
{
"path": "output/{basepath}/{filename}-100.webp",
"format": "webp",
"width": 100,
"height": 100
},
{
"path": "output/{basepath}/{filename}-100{extension}",
"width": 100,
"height": 100,
"options": {
"quality": 10
}
}
]
}
]
Development
Pyper is run as the CLI command pyper
.
npm install
npm link
You should then be able to run this in another folder:
pyper
License
MIT