Docs: add animated WebP example #2648

This commit is contained in:
Lovell Fuller
2021-04-01 16:04:46 +01:00
parent cd410080bd
commit 08a25a0c8f
3 changed files with 14 additions and 1 deletions

View File

@@ -267,6 +267,13 @@ const data = await sharp(input)
.toBuffer();
```
```javascript
// Optimise the file size of an animated WebP
const outputWebp = await sharp(inputWebp, { animated: true })
.webp({ reductionEffort: 6 })
.toBuffer();
```
- Throws **[Error][4]** Invalid options
Returns **Sharp**

File diff suppressed because one or more lines are too long