> For the complete documentation index, see [llms.txt](https://docs.does.qa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.does.qa/test-steps/runner/generate-image.md).

# Generate Image

Generate image creates a JPEG or PNG during the Run. Use it when the journey needs an image file that does not already exist on the page, such as an upload or a webcam stream.

![Generate image Test Step](https://app.does.qa/screenshots/node/runner_generate_image.png)

## When to use it

* Build an image to upload with [File](/test-steps/action/file.md).
* Feed a webcam check with [Set webcam](/test-steps/runner/set-webcam.md).
* Prefer a fixed Filename so later steps can pick the Generated File reliably.

## Example Flow

Generate the image, then upload it with [File](/test-steps/action/file.md).

![Generate image then File upload](/files/B69lCMrRLr1nMcdl2WXl)

## Configure

### Basics

| Field           | What to set                                  |
| --------------- | -------------------------------------------- |
| **Type**        | `JPEG` (default) or `PNG`                    |
| **Filename**    | Text and/or [Values](/values/value-store.md) |
| **Custom text** | Optional text drawn into the generated image |
| **Width**       | `1`–`2000` (default `600`)                   |
| **Height**      | `1`–`2000` (default `400`)                   |

### Advanced

| Field                                 | What to set                                          |
| ------------------------------------- | ---------------------------------------------------- |
| **Status on fail**                    | [Failed Status](/test-step-options/failed-status.md) |
| **When should screenshots be taken?** | `Always` or `On Failures` (default)                  |

{% hint style="info" %}
**Pro tip:** Keep Width and Height close to what the upload field expects so the app accepts the file on the first try.
{% endhint %}

## Related

* [File](/test-steps/action/file.md)
* [Set webcam](/test-steps/runner/set-webcam.md)
* [Generate file](/test-steps/runner/generate-file.md)
* [Test file uploads and downloads](/guides/test-file-uploads-and-downloads.md)
* [Runner](/test-steps/runner.md)

**Tags:** `runner`, `generate`, `image`
