Extend
Use the extend transformation to add side-specific canvas space to a delivered image variant.
Overview
extend is useful when you need precise control over new canvas space. It can add different amounts to the top, right, bottom, and left sides, and it can include a background color in the shorthand value.
Syntax
| Field | Value |
|---|---|
| Canonical parameter | extend |
| Alias | ex |
| Value syntax | top[:right[:bottom[:left[:background]]]], or an SDK object |
| Side range | Integer pixels from 0 through 8192 |
Example
https://cdn.imgwire.dev/{organization_id}/{environment_id}/{image_id}?extend=40:72:40:72:F3F4F6
image.url({
extend: {
top: 40,
right: 72,
bottom: 40,
left: 72,
background: 'F3F4F6',
},
format: 'auto',
quality: 'auto',
});
imgwire images url img_123 --extend 40:72:40:72:F3F4F6 --format auto
Live examples
Best practices
- Use
extendwhen you need explicit side control. - Use Padding for simpler equal spacing.
- Include a background color in the value when the extension should match a specific surface.
Common mistakes
- Passing side values in the wrong order. The shorthand is
top:right:bottom:left. - Using
extendfor layout cropping. Extend adds canvas; it does not remove pixels. - Adding large extension values without checking final delivered dimensions.
Related pages
Last updated at: May 9, 2026