Image padding
Try it interactively →POST /api/image-paddingAdd padding around an image: configurable per-side widths and a fill colour. Useful for matting, adding margins for OG images, or composing thumbnails.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| image* | file | — | Input image (PNG / JPEG / WebP). |
| top | number (0…8192) | 0 | Pixel padding on the top edge. |
| right | number (0…8192) | 0 | Pixel padding on the right edge. |
| bottom | number (0…8192) | 0 | Pixel padding on the bottom edge. |
| left | number (0…8192) | 0 | Pixel padding on the left edge. |
| color | string | "transparent" | Fill colour for the new pixels (any CSS / ImageMagick colour name). Default `transparent`. |
| format | enum (png | jpeg | webp) | — | Output format. Defaults to the input's format. |
Response
Modes: binary, base64-json. Cache: yes (24h TTL).