Skip to main content

Height

Use the height transformation to request a delivered image variant with a target pixel height.

Overview

If you provide only height, Imgwire preserves the image's aspect ratio. This is useful when a design constrains vertical space but does not require an exact crop.

Combine height with Width and Resizing Type when your app needs an exact output box. Add Gravity when that fixed-size resize should keep an important region in view.

Syntax

FieldValue
Canonical parameterheight
Aliash
Accepted valuesInteger 1 through 8192

Example

https://cdn.imgwire.dev/{organization_id}/{environment_id}/{image_id}?height=360&format=auto&quality=auto
https://cdn.imgwire.dev/{organization_id}/{environment_id}/{image_id}?width=256&height=256&resizing_type=cover&gravity=attention&format=auto&quality=auto
image.url({
height: 360,
format: 'auto',
quality: 'auto',
});
image.url({
width: 256,
height: 256,
resizing_type: 'cover',
gravity: 'attention',
format: 'auto',
quality: 'auto',
});
imgwire images url img_123 --height 360 --format auto --quality auto

Live examples

Each image uses the same source with a different requested height.

180px tall320px tall480px tall
Demo image resized to 180 pixels tallDemo image resized to 320 pixels tallDemo image resized to 480 pixels tall

Best practices

  • Use height for vertical constraints where aspect ratio should be preserved.
  • Use fixed width and height with resizing_type=cover for cards, avatars, and thumbnails that need exact dimensions.
  • Add gravity=attention to fixed avatar, profile picture, and thumbnail resizes when uploaded images may have off-center subjects.
  • Pair height variants with layout dimensions to reduce cumulative layout shift.

Common mistakes

  • Expecting height alone to crop an image. It preserves aspect ratio unless combined with other sizing behavior.
  • Requesting a taller image than the UI needs.
  • Forgetting to include width when the rendered slot has a fixed aspect ratio.
  • Expecting gravity to change a height-only resize; gravity matters when another option creates placement or crop-like behavior.

Last updated at: May 10, 2026