# Image

Resize, convert, crop or inspect an image.

## Do things in Image

Add an **Image** step and choose an **Operation**. Choose the row to see the fields of each.

- [Image](https://docs.gorunner.io/apps/image#fields-f-process): Metadata · Resize · Convert format · Crop · Rotate

Later steps read a step’s output by its name: see [Use data from earlier steps](https://docs.gorunner.io/build/use-data-from-earlier-steps).

Not in your list? See [When an app isn’t here](https://docs.gorunner.io/apps/when-an-app-isnt-here#q-not-in-list).

## For developers

In the API, which calls apps pieces, Image is `pieceId: "image"` with `actionId: "process"`, set by `operation`. [Get an app](https://docs.gorunner.io/api/apps/get-app) returns every field.

It computes from its inputs only (`pure`). See [How versions and side effects work](https://docs.gorunner.io/apps#q-versions).

### Image › Image

Resize / convert / crop / read metadata of an image (PNG, JPEG, GIF, BMP, TIFF or WebP).

### Metadata

- **Image · Required**: Upload a file, or switch to an expression to use one from an earlier step (such as {{steps.download.result}}).

### Resize

- **Image · Required**: Upload a file, or switch to an expression to use one from an earlier step (such as {{steps.download.result}}).
- **Width (px) · Optional**: 0 to scale by height keeping aspect ratio.
- **Height (px) · Optional**: 0 to scale by width keeping aspect ratio.
- **JPEG Quality · Optional**: Compression quality from 1 (smallest) to 100 (best), used when the image is a JPEG. Default: 90.

### Convert format

- **Image · Required**: Upload a file, or switch to an expression to use one from an earlier step (such as {{steps.download.result}}).
- **Output Format · Optional**: The picture file type to save the image as, such as PNG, JPEG, or GIF. Options: PNG, JPEG, GIF, BMP, TIFF. Default: PNG.
- **JPEG Quality · Optional**: Compression quality from 1 (smallest) to 100 (best). Blank = 90. Shows when **Output Format** is **JPEG**.

### Crop

- **Image · Required**: Upload a file, or switch to an expression to use one from an earlier step (such as {{steps.download.result}}).
- **X · Optional**: How many pixels in from the left edge the crop starts (such as 0 for the very left). Default: 0.
- **Y · Optional**: How many pixels down from the top edge the crop starts (such as 0 for the very top). Default: 0.
- **Crop Width · Optional**: How wide the cropped image should be, in pixels (such as 200).
- **Crop Height · Optional**: How tall the cropped image should be, in pixels (such as 200).
- **JPEG Quality · Optional**: Compression quality from 1 (smallest) to 100 (best), used when the image is a JPEG. Default: 90.

### Rotate

- **Image · Required**: Upload a file, or switch to an expression to use one from an earlier step (such as {{steps.download.result}}).
- **Degrees · Optional**: How far to rotate clockwise, in degrees (such as 90). Negative rotates counter-clockwise. Default: 90.
- **Background · Optional**: Color for the empty corners when rotating by a non-90° angle, as a hex value (such as #ffffff or #ffffff00 for transparent). Blank = transparent.
- **JPEG Quality · Optional**: Compression quality from 1 (smallest) to 100 (best), used when the image is a JPEG. Default: 90.

Source: https://docs.gorunner.io/apps/image
