Skip to content

Commit

Permalink
feat: Quality of the image, between 0-100. Not applicable to png images.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbbfcd authored Jan 29, 2024
1 parent 38682a2 commit d236933
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ const internalCaptureWebsiteCore = async (input, options, page, browser) => {
screenshotOptions.type = options.type;
}

if (options.quality) {
// Quality of the image, between 0-100. Not applicable to png images.
if (typeof options.quality === 'number' && options.type && options.type !== 'png') {
screenshotOptions.quality = options.quality * 100;
}

Expand Down

0 comments on commit d236933

Please sign in to comment.