Skip to content

Commit 81cf5b0

Browse files
add support png for sharp
1 parent 54be2d0 commit 81cf5b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/adapters/sharp.ts

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ class SharpAdapter {
4040
progressive: options.progressive,
4141
})
4242
}
43+
if (mime === 'image/png') {
44+
resized = resized.png({
45+
quality: options.quality,
46+
progressive: options.progressive,
47+
})
48+
}
4349
if (mime === 'image/webp') {
4450
resized = resized.webp({
4551
quality: options.quality,

0 commit comments

Comments
 (0)