Skip to content

Commit a422704

Browse files
authored
fix(storage-resize-images): maintain aspect ratio of resized images (#2115)
1 parent d7bdc93 commit a422704

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

storage-resize-images/functions/src/resize-image.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export function resize(file, size) {
4747
return sharp(file, ops)
4848
.rotate()
4949
.resize(parseInt(width, 10), parseInt(height, 10), {
50+
fit: "inside",
5051
withoutEnlargement: true,
5152
...sharpOptions,
5253
})

0 commit comments

Comments
 (0)