Skip to content

Commit

Permalink
fix: add webp to screenshot quality option allow list (#7631)
Browse files Browse the repository at this point in the history
This allows passing through the screenshot quality option from Puppeteer to Chrome
when using the WebP image format
  • Loading branch information
tjunnone committed Oct 7, 2021
1 parent 2886129 commit b20c2bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/Page.ts
Expand Up @@ -2610,7 +2610,7 @@ export class Page extends EventEmitter {

if (options.quality) {
assert(
screenshotType === 'jpeg',
screenshotType === 'jpeg' || screenshotType === 'webp',
'options.quality is unsupported for the ' +
screenshotType +
' screenshots'
Expand Down

0 comments on commit b20c2bf

Please sign in to comment.