---
canonical: https://amplience.com/developers/docs/workforce/flows/action-reference/image-actions/
title: Workforce Image actions
description: Use Workforce image actions in flows to crop, resize, and trim images, fill or remove backgrounds, detect and modify tags, and extract color swatches, automating image editing at scale.
audience: Business User
image: https://cdn.media.amplience.net/i/ampproduct/content-flows-normalize-background-in-use?w=1200&h=630
image_width: 1200
image_height: 630
date_published: 2026-01-22
date_modified: 2026-07-07
---

# Image actions

Image actions let you prepare, analyze, and enhance images within Workforce flows. The descriptions here outline the purpose, when to use, and the most commonly used inputs and outputs for each action.

> **Tip:** Additional input and output variables may be available when designing flows.

## Load Image from URL

Loads an image from an external web location, by passing an image URL to the input. The output image can then be used in any of the other image actions.

**Inputs:** Image URL (string)

**Outputs:** Image

**Featured in these example flows**

- [Automatic alt text example](https://amplience.com/developers/docs/workforce/flows/examples/automatic-alt-text/)

## Adjust Image Size

Gives the option to change the canvas size, positioning and padding of an image.

> **Tip:** This action is useful to use after Trim Image, to resize an image with a transparent background.

**Inputs:**

| Input | Type | Required | Description |
|:---|:---|---:|:---|
| `image` | Image | Yes | The image to crop |
| `width` | number | Yes | The target width of the output image in pixels. Default: `2000` |
| `height` | number | Yes | The target height of the output image in pixels. Default: `2000` |
| `position` | string | No | The position of the image subject within the resized canvas. For example, Top left, Middle right |
| `padding` | string | No | Padding to apply inside the canvas. Accepts 1–4 comma-separated values (pixels or percentages). Negative values are allowed. See Padding syntax below |

*Padding syntax:* Like CSS shorthand: comma-separated pixels or percentages, negative values are allowed:

| Example values | Applies to |
|---|:---|
| `10` | All sides |
| `10,20` | Top/bottom, left/right |
| `10,20,30` | Top, left/right, bottom |
| `10%,-5%,10%,5%` | Top, right, bottom, left (clockwise) |

**Outputs:** 

| Output | Type | Description |
|:---|:---|:---|
| `image` | Image | The size adjusted image |

**Example** 

Here's an example result from the **Adjust Image Size** action, with width and height set to 3000px, and 10% padding on all sides:

![Workforce Flows run window showing output for the Adjust Image Size action](https://cdn.media.amplience.net/i/ampproduct/flow-adjust-image-size-action?w=1880&fmt=png 'Workforce Flows run window showing output for the Adjust Image Size action')

## Trim Image

Automatically trims an image down to its non-transparent foreground, removing any surrounding empty space based on the alpha channel. No padding is added.

> **Tip: Tips**
> - If your image doesn’t have a transparent background, try using [Remove Background](#remove-background) first
> - To achieve consistent padding and resizing, follow this action with [Adjust Image Size](adjust-image-size) or [Crop Image](#crop-image) action
> - Learn [how Trim Image differs from Crop Image](#trim-image-versus-crop-image)

**Inputs:** Image (The image to trim - requires a transparent background)

**Outputs:** Image (Trimmed image)

**Example** 

Here's an example result from the **Trim Image** action:

![Workforce Flows run window showing the output for the Trim Image action](https://cdn.media.amplience.net/i/ampproduct/flow-trim-image-action?w=1880&fmt=png 'Workforce Flows run window showing the output for the Trim Image action')

## Fill Background

Replaces any **transparent** background with a color of your choice.

> **Tip:** If your image doesn’t have a transparent background, try using the [Remove Background](#remove-background) action first.

**Inputs:** Image (with background removed), the Background Color - can be rgba or hex format

**Outputs:** Image (with background fill applied)

**Example** 

Here's an example result from the **Fill Image Background** action:

![Workforce Flows run window showing the output for the Fill Image Background action](https://cdn.media.amplience.net/i/ampproduct/flow-fill-background?w=1880&fmt=png 'Workforce Flows run window showing the output for the Fill Image Background action')

## Crop Image

Automatically crops an image by determining the primary foreground object, positioning the object within the new canvas size you specify and applying the specified padding.

> **Note:** Cropping an image isn't always suitable for images that lack a clear separation between foreground and background (for example, lifestyle shots). For these images, [Adjust Image Size](#adjust-image-size) on its own may be more suitable.

The **Allow Upscaling** option is useful if the original foreground object is smaller than the requested output size. It allows the action to scale the image up, rather than stopping with an error. Note that scaling up may slightly reduce image quality.

> **Tip:** Learn [how Crop Image differs from Trim Image](#trim-image-versus-crop-image).

**Inputs:**

| Input | Type | Required | Description |
|:---|:---|---:|:---|
| `image` | Image | Yes | The image to crop |
| `width` | number | Yes | The target width of the output image in pixels. Default: `2000` |
| `height` | number | Yes | The target height of the output image in pixels. Default: `2000` |
| `padding` | string | No | Padding to apply inside the canvas. Accepts 1–4 comma-separated values (pixels or percentages). Negative values are allowed. See ***Padding syntax*** below |
| `position` | enum | No | The position of the image subject within the cropped canvas. For example, Top left, Middle right. See ***Position values*** below |
| `allowUpscaling` | boolean | No | When enabled, the foreground image will be upscaled to fill the canvas if it is smaller than the target dimensions. Default: `true` |

    ***Padding syntax***

    Like CSS shorthand: comma-separated pixels or percentages, negative values are allowed.

    | Example values | Applies to |
    |---|:---|
    | `10` | All sides |
    | `10,20` | Top/bottom, left/right |
    | `10,20,30` | Top, left/right, bottom |
    | `10%,-5%,10%,5%` | Top, right, bottom, left (clockwise) |

    ***Position values***

    The `position` input controls where the image subject is placed within the cropped canvas, and accepts one of the following.

    | Value | Position |
    |---|---|
    | `TL` | Top left |
    | `TC` | Top center |
    | `TR` | Top right |
    | `ML` | Middle left |
    | `MC` | Middle center |
    | `MR` | Middle right |
    | `BL` | Bottom left |
    | `BC` | Bottom center |
    | `BR` | Bottom right |

**Outputs:** 

| Output | Type | Description |
|:---|:---|:---|
| `image` | Image | The cropped image |

**Example** 

Here's an example result from the **Crop Image** action, using the default width and height, 10% padding on all sides, and upscaling enabled:

![Workforce Flows run window showing output for the Crop Image action](https://cdn.media.amplience.net/i/ampproduct/flow-crop-image-action?w=1880&fmt=png 'Workforce Flows run window showing output for the Crop Image action')

**Featured in these example flows**

- [Product image standardization](https://amplience.com/developers/docs/workforce/flows/examples/product-image-standardization/)

## Normalize Background

Changes the background color of the image, while maintaining shadows and highlights, to make background color more consistent or realistic.

**Inputs:**

- Image - The original image

- Foreground (image) - A version of the original image with the background removed (for example, by using [Remove Background](#remove-background))

- Background Color (string, required). This is the color that should be applied (in RGBA format)

**Outputs:** Image with normalized background

**Example**

Here's Normalize Background in use. A Form trigger allows the user to upload the original image, then the background is removed ready for normalization.

![The Normalize Background action in use within a flow](https://cdn.media.amplience.net/i/ampproduct/content-flows-normalize-background-in-use?w=1880&fmt=png 'The Normalize Background action in use within a flow')

**Featured in these example flows**

- [Product image standardization](https://amplience.com/developers/docs/workforce/flows/examples/product-image-standardization/)

## Remove Background

Uses AI to remove the background from images.

**Inputs:** Image

**Outputs:** Image with background removed

**Example** 

Here's an example result from the **Remove Background** action:

![Workforce Flows run window showing the output for the Remove background action](https://cdn.media.amplience.net/i/ampproduct/flow-remove-image-background?w=1880&fmt=png 'Workforce Flows run window showing the output for the Remove background action')

## Modify Tags

Add or remove tags from an image.

**Inputs**

| Input | Type | Required | Description |
|:---|:---|---:|:---|
| `image` | Image | Yes | The image to add or remove tags from |
| `add` | array of strings | No | Tags to add to the image |
| `remove` | array of strings | No | Tags to remove from the image |
| `caseInsensitive` | boolean | No | When enabled, tag matching ignores case. Default: `false` |

**Outputs**

| Output | Type | Description |
|---|---|---|
| `image` | Image | The image with the updated tags |

## Auto Detect Tags

Analyses images and automatically applies tags based on natural-language rules.

**Configuration:**

- Model - Choose a model with with image analysis capabilities

- Tags (array of tags and tag descriptions) - Add your custom tags together with a natural language description of what the LLM should look for when analyzing the image. If the LLM finds a match for the description, the tag name will be added to the tags array. Multiple tags can be added at a time.

  For each tag, you enter details for when the tag is to be applied. For example, for a tag of "Shoe", the **When to apply this tag** field could contain "When the image contains a shoe". Or you could be more specific and tag particular types of shoe.

    ![Workforce Flows designer window showing example of how to configure tags](https://cdn.media.amplience.net/i/ampproduct/flow-auto-detect-action-ref?w=1880&fmt=png 'Workforce Flows designer window showing example of how to configure tags')

**Inputs** Image (to analyze)

**Outputs:** Image (with the detected tags applied)

**Featured in these example flows**

- [Image tagging and Content Hub upload example](https://amplience.com/developers/docs/workforce/flows/examples/image-tagging-upload/)

## Extract Swatch

Extracts a color swatch from an image using AI to identify the most representative color area of a product.

The swatch can be focused on a specific product or be taken from the center of the image.

**Configuration:**

- Model - Use a model with image analysis capabilities.

**Inputs:**

- Image - The image to extract the swatch from.
- Size - The width and height of the swatch (in pixels). Minimum: `1`, maximum: `512`. Default: `64`. Swatches are always square.
- Product (optional) - The name or description of the product in the image to focus on when extracting the swatch. If not provided, the action is prompted to find the most obvious product within the image and to extract a swatch from that.

**Outputs:** Color swatch as a square image at the specified size

Also outputs variables for:

- Bounds - Bounding box coordinates showing where the swatch was extracted from
- Dominant colors - RGBA format (Example: rgba(255, 128, 64, 1.1)) and HEX format (Example: #FF8040)

Note, if the generated swatch is close to the edge of the image, a closest match is generated.

**Example:**

Here's Extract Swatch in use. The input form allows an image **and** product name to guide the swatch output.

![Workforce run window showing Extract swatch in use with an image and a product name](https://cdn.media.amplience.net/i/ampproduct/content-flows-extract-swatch-in-use?w=1880&fmt=png 'Workforce run window showing Extract swatch in use with an image and a product name')

**Featured in these example flows**

- [Extract swatch example](https://amplience.com/developers/docs/workforce/flows/examples/extract-swatch/)

## Tips for using image actions

### Save image output

To save image action output directly from a flow run:

1. In the flow run, hover over the image until the magnify icon displays:
  ![Workforce run window showing an image magnified for viewing](https://cdn.media.amplience.net/i/ampproduct/flow-image-action-download-1?w=1880&fmt=png 'Workforce run window showing an image magnified for viewing')
2. Click to open the magnified view, then right-click the image and select "Save image as...":
  ![Workforce run window with the save image as menu option displayed](https://cdn.media.amplience.net/i/ampproduct/flow-image-action-download-2?w=1880&fmt=png 'Workforce run window with the save image as menu option displayed')

  :::note

  The right-click menu and wording may vary slightly depending on your browser.

  :::

### Trim Image versus Crop Image

Although these actions sound similar, they work differently and serve different purposes. Trim Image automatically removes empty space based on transparency, while Crop Image automatically locates the primary foreground object then positions the object within the new canvas size you specify and applies the specified padding. Trim Image is often used in combination with other actions to achieve a similar result to Crop Image.

Running Remove Background → **Trim Image** → Adjust Image Size produces similar framing to **Crop Image** alone, but with the background fully removed.

## Related pages

[Content Hub actions](https://amplience.com/developers/docs/workforce/flows/action-reference/content-hub-actions) — read assets from and write them back to Content Hub

[Example flow: product image standardization](https://amplience.com/developers/docs/workforce/flows/examples/product-image-standardization) — a worked flow using Crop Image and Fill Background

[Adding actions to flows](https://amplience.com/developers/docs/workforce/flows/action-reference/#adding-actions-to-flows)

[Inputs, outputs and ports](https://amplience.com/developers/docs/workforce/flows/action-reference/#inputs-outputs-and-ports)

[Input field variables](https://amplience.com/developers/docs/workforce/flows/action-reference/#input-field-variables)
