Skip to content

Commit

Permalink
fix(storage-resize-images): maintain aspect ratio of resized images
Browse files Browse the repository at this point in the history
  • Loading branch information
gregives authored Jun 13, 2024
1 parent 03ea3c8 commit 08afa3f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions storage-resize-images/functions/src/resize-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export function resize(file, size) {
return sharp(file, ops)
.rotate()
.resize(parseInt(width, 10), parseInt(height, 10), {
fit: "inside",
withoutEnlargement: true,
...sharpOptions,
})
Expand Down

0 comments on commit 08afa3f

Please sign in to comment.