Created
November 20, 2019 14:22
-
-
Save alfredwesterveld/a73624a8990c20b77c2d8fa262e45536 to your computer and use it in GitHub Desktop.
test chaining sharp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sharp = require('sharp'); | |
sharp('./3MB.png').resize(400, 400).jpeg({ | |
quality: 1, | |
force: true | |
}).webp({ | |
lossless: false, | |
quality: 50, | |
force: true | |
}).toFile('./chain.webp'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sharp = require('sharp'); | |
sharp('./3MB.png').resize(400, 400).jpeg({ | |
quality: 85, | |
force: true | |
}).webp({ | |
lossless: false, | |
quality: 50 | |
}).toFile('./no-chain.webp'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment