Skip to content

Instantly share code, notes, and snippets.

@alfredwesterveld
Created November 20, 2019 14:22
Show Gist options
  • Save alfredwesterveld/a73624a8990c20b77c2d8fa262e45536 to your computer and use it in GitHub Desktop.
Save alfredwesterveld/a73624a8990c20b77c2d8fa262e45536 to your computer and use it in GitHub Desktop.
test chaining sharp
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');
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