> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# loadMediaOf()

> Function exported by @botmesh/core.

```ts theme={null}
function loadMediaOf(ctx, options?): Promise<MediaPayload | undefined>;
```

Defined in: [core/context.ts:303](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/context.ts#L303)

Public accessor — `ctx.media` is populated on first call via the provider's downloader.
Resolves `undefined` when the message carries no media or (by default) the download fails.

## Parameters

| Parameter | Type |
| - | - |
| `ctx` | [`MessageContext`](https://botmesh.afaya.com.co/api/core/interfaces/MessageContext) |
| `options?` | [`LoadMediaOptions`](https://botmesh.afaya.com.co/api/core/interfaces/LoadMediaOptions) |

## Returns

`Promise`\<[`MediaPayload`](https://botmesh.afaya.com.co/api/core/interfaces/MediaPayload) | `undefined`>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.