From b20c2bfa24cbdd4a1b9cefca2e0a9407e442baf5 Mon Sep 17 00:00:00 2001 From: Tomas Junnonen Date: Thu, 7 Oct 2021 14:15:24 -0700 Subject: [PATCH] fix: add webp to screenshot quality option allow list (#7631) This allows passing through the screenshot quality option from Puppeteer to Chrome when using the WebP image format --- src/common/Page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/Page.ts b/src/common/Page.ts index d1ca8bb931a09..21f85c7d06235 100644 --- a/src/common/Page.ts +++ b/src/common/Page.ts @@ -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'