# Image upload

Upload field renders an Add media button. Clicking it opens the standard Select or Upload Media dialogue and will render the `thumbnail` size of the selected image. Clicking the Trash button resets the field.

## Example configuration

```php
...
array(
    'title' => 'My upload field title',
    'id' => 'upload-option',
    'desc' => 'Short description for the field',
    'tab' => 'main',
    'type' => 'upload',
),
...
```

This will produce the following

![](https://2720448264-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LKMTiOPVR7pXWhebz7q%2Fsync%2F7cfa62d9957d1583098c9cdd966de69a681e93a3.png?generation=1602624631919753\&alt=media)

## Params

| Name    | Type   | Description                                                      |
| ------- | ------ | ---------------------------------------------------------------- |
| `type`  | string | `upload` **(required)**                                          |
| `id`    | string | Unique ID that will be used to retrieve the value **(required)** |
| `tab`   | string | Specifies in which tab this option will be rendered              |
| `title` | string | Shows a heading to the left of the field                         |
| `desc`  | string | Shows a description text (can have HTML)                         |
