Skip to content
This repository was archived by the owner on May 28, 2023. It is now read-only.

Commit b06e261

Browse files
author
David Grimason
committed
Replace Sharp's crop function
1 parent 7b29901 commit b06e261

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export async function fit (buffer, width, height) {
4545
const transformer = sharp(buffer);
4646

4747
if (width || height) {
48-
transformer.resize(width, height).crop();
48+
transformer.resize(width, height, { fit: sharp.fit.cover });
4949
}
5050

5151
return transformer.toBuffer();

0 commit comments

Comments
 (0)