4

In our Firebase storage, we have images that have widths of 1080 and varying heights. Using this extension (https://firebase.google.com/products/extensions/storage-resize-images), we need to resize the width to 480, maintaining the aspect ratio. How can this be accomplished using this extension? It allows us to specify dimensions, but not what we need.

If this extension can't do this, what are similar alternatives?

Shlok Jhawar
  • 277
  • 2
  • 3
  • 19

1 Answers1

2

From here

For example, say that you specify a max width of 200px and a max height of 100px. You upload an image that is 480px wide by 640px high, which means a 0.75 aspect ratio. The final resized image will be 75px wide by 100px high to maintain the aspect ratio while also being at or under both of your maximum specified dimensions.

I was also initially confused by this. In summary, the dimensions you specify are the maximum values of either dimension; depending on the aspect ratio, one or both of these values will be used, and aspect ratio will always be maintained.

gannonbarnett
  • 1,638
  • 1
  • 16
  • 28