Skip to content

Commit de2f7df

Browse files
authored
Merge pull request #8 from appwrite/feat-more-configs
Feat more configs
2 parents eca1be0 + ec78216 commit de2f7df

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,14 @@ router.post(
180180
// Build screenshot options
181181
const screenshotOptions = {
182182
type: body.format,
183-
quality: body.quality,
184183
fullPage: body.fullPage,
185184
};
186185

186+
// Quality is only supported for JPEG and WebP formats
187+
if (body.format === "jpeg" || body.format === "webp") {
188+
screenshotOptions.quality = body.quality;
189+
}
190+
187191
if (body.clip) {
188192
screenshotOptions.clip = body.clip;
189193
}

0 commit comments

Comments
 (0)