Puppeteer: {value} screenshots do not support 'quality'.
Screenshot quality is supplied for PNG or another unsupported output type.
Screenshot quality is supplied for PNG or another unsupported output type.
Error message
{value} screenshots do not support 'quality'.
{value} is replaced by the value shown in your error message.
How this error happens
Adding quality to PNG output mixes an option for lossy image formats with a lossless format.
The snippets use an open Puppeteer page named page.
await page.screenshot({
type: "png",
quality: 80,
});
How to fix
Remove quality for PNG, or explicitly choose JPEG or WebP when you need a quality setting.
await page.screenshot({
type: "png",
});
Things to keep in mind
Changing the file extension alone is not a substitute for choosing the correct screenshot type.