# addMedia

The `addMedia` command adds one or more media files from your workspace to the device's gallery on both Android and iOS. This makes the files accessible to your application during a test flow.

The command accepts a list of strings, where each string is the relative path to a media file in your workspace.

### Usage examples

The following example adds a PNG image and an MP4 video to the device's gallery.

```yaml
- addMedia:
    - "./assets/foo.png"
    - "./assets/foo.mp4"
```

### Supported formats

This command supports the following file formats:

* `PNG`
* `JPEG`
* `JPG`
* `GIF`
* `MP4`


---

# 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.maestro.dev/reference/commands-available/addmedia.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.
