Skip to main content

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

FieldValue
Canonical parameterextend
Aliasex
Value syntaxtop[:right[:bottom[:left[:background]]]], or an SDK object
Side rangeInteger 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

Demo image extended on all sides
Equal extension
Demo image extended more on the left and right
Wider sides
Demo image extended with extra bottom space
Extra bottom

Best practices

  • Use extend when 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 extend for layout cropping. Extend adds canvas; it does not remove pixels.
  • Adding large extension values without checking final delivered dimensions.

Last updated at: May 9, 2026