# image

This is an image input field. You can set an URL of image, or upload from computer. In this case the value of model will be an base64 encoded string.

## Special properties of field

| Property       | Default | Accepted values                                                       | Description                                                                               |
| -------------- | ------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `autocomplete` | *none*  | [see doc](https://html.spec.whatwg.org/multipage/forms.html#autofill) | Indicates whether the value of the control can be automatically completed by the browser. |
| `browse`       | `true`  | `Boolean`                                                             | If `true`, the file browser input field is visible.                                       |
| `placeholder`  | *none*  | `String`                                                              | Placeholder text for input field                                                          |
| `hideInput`    | `false` | `Boolean`                                                             | Hidden the `link` input field                                                             |
| `preview`      | `true`  | `Boolean`                                                             | If `true`, the preview is visible.                                                        |
| `readonly`     | `false` | `Boolean`                                                             | If true, the input field is read only                                                     |

## Usage

### Image field with browse and preview

```javascript
{
    type: "image",
    label: "Avatar",
    model: "avatar",
    required: true
}
```

### Image field without browse

```javascript
{
    type: "image",
    label: "Avatar",
    model: "avatar",
    required: true,
    browse: false
    preview: true
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vue-generators.gitbook.io/vue-generators/develop/fields/optional_fields/image.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
