# imageChooser

## Description

Selects an image from user's phone storage.

## Input / Parameter

| Name     | Description             | Input Type | Default | Options | Required |
| -------- | ----------------------- | ---------- | ------- | ------- | -------- |
| multiple | The image(s) to choose. | Array/List | -       | -       | Yes      |

## Output

N/A

## Callback

### callback

The setComponentValue function will be executed to show the image chosen in the image component if it exists.

### errorCallback

The function to be executed if the image component does not exist.

## Video

Coming Soon.

## Example

The user wants to display an image from their gallery/phone storage.

### Step

1. Drag an image, label and button component. Rename the label component to 'Result' and the button component to 'Image Chooser'.

   ![](/files/HV4UKASe317xrnib4SwP)
2. Call the function `imageChooser` in the button. Call the function `console` in the callbacks of the `imageChooser` function. Select the parameter type `input` for the `value` parameter.

   ![](/files/jN4q4oMMvAK6TF2umztQ)
3. In the callbacks, call the function `setComponentValue`. For the success callback, select the image component in the `component` parameter. For the error callback, select the label component in the `component` parameter. Set the `value` parameter type to `input`.

   ![](/files/tPYeK2YzCR2uOc9NhSRD)

   ![](/files/hB9AeF9q2FUGNtuOJwgp)

   ![](/files/Aq1aAFCigbSnblhvQwbu)

### Result

The image chosen will be displayed in the image component if it exists. If image does not exist, the label component will show the error.

![](/files/I0lHJbtRp0pbgMhy0v12)

![](/files/mraNtyYnwB82nVhBpnk6)

## Links


---

# 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://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/device/imagechooser.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.
