Homepage

ImageResizeFit

Last edit: Oct 26, 2022

No description

enum ImageResizeFit {
  contain
  cover
  fill
  inside
  outside
}

Values

contain

Embed within both provided dimensions.

cover

Crop to cover both provided dimensions

fill

Ignore the aspect ratio of the input and stretch to both provided dimensions.

inside

Preserving aspect ratio, resize the image to be as large as possible while
ensuring its dimensions are less than or equal to both those specified.

outside

Preserving aspect ratio, resize the image to be as small as possible while
ensuring its dimensions are greater than or equal to both those specified.
Some of these values are based on the object-fit CSS property.

Questions?

We are always happy to help with any questions you may have.

contact us