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 committed Jun 25, 2024
1 parent db3e4d1 commit b6a77d9
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 b6a77d9

Please sign in to comment.