Skip to content

Commit

Permalink
Tweak default jpeg and webp quality
Browse files Browse the repository at this point in the history
  • Loading branch information
Legend-Master committed Aug 14, 2024
1 parent 6749ee8 commit 8ce13d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@ async function processImage(
let output: sharp.Sharp
switch (format) {
case 'jpeg':
output = resized.jpeg({ progressive: size > 500 })
output = resized.jpeg({ quality: 75, progressive: size > 500 })
break
case 'webp':
output = resized.webp()
output = resized.webp({ quality: 75 })
break
case 'avif':
output = resized.avif()
output = resized.avif({ quality: 50 })
break
}
const data = await output.toBuffer()
Expand Down

0 comments on commit 8ce13d3

Please sign in to comment.