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
| Field | Value |
|---|---|
| Canonical parameter | height |
| Alias | h |
| Accepted values | Integer 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 tall | 320px tall | 480px tall |
|---|---|---|
Best practices
- Use
heightfor vertical constraints where aspect ratio should be preserved. - Use fixed
widthandheightwithresizing_type=coverfor cards, avatars, and thumbnails that need exact dimensions. - Add
gravity=attentionto 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
heightalone 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
gravityto change a height-only resize; gravity matters when another option creates placement or crop-like behavior.
Related pages
Last updated at: May 10, 2026