Tutorials
General
Robots

/image/resize robot
Takes a single image file as input and produces a resized version of it. Ideal for generating thumbnails.
| Parameter | Description |
|---|---|
| width |
Optional. Size for the new image in px. The allowed range is 1-5000.
|
| height |
Optional. Height for the new image in px. The allowed range is 1-5000.
|
| background |
Optional, default = "#FFFFFF". Either a hex code or the
name
of a color to fill the background with (only used for the pad resize strategy).
|
| resize_strategy |
Optional, default = "fit". See
list of resize strategies.
|
| format |
Optional. Available formats: "jpg", "png", "gif", "tiff"
|
| watermark_url | Optional. Url to a png image to overlay over this image. |
| watermark_position |
Optional. The position you'd like the watermark to have. Available options
are: "center", "top", "bottom", "left", "right". You can also
combine options, for example "bottom-right".
|
| watermark_size |
Optional. The size in percent for this watermark. E.g. "50%".
|
| watermark_resize_strategy |
Optional, default = "fit". Supports "fit" and "stretch".
|
Resize Strategies
The examples below show the following image resized to 100x100px for each available strategy:

| Strategy | Description |
|---|---|
| fit |
Uses width and height as the maxium values for the resize and
preserves aspect ratio.
|
| stretch |
Ignores aspect ratio and resizes the image to the exact width and
height given. This may result in a stretched / distored image:
|
| pad |
Scales the image to fit and then fills the remaining width and height
area with the defined background color (here #aa0000):
|

