# Functions (/themes/sdk/reference/media/functions)

```ts
import { … } from '@poltura/theme-sdk/media';
```

## `asset` [#asset]

A reference to a file under the theme's `assets/` folder, by its path there.

```ts
asset(path: string): AssetRef
```

**Parameters**

- `path: string`: The path inside `assets/`, such as `images/hero.jpg`.

**Returns:** The `asset://` reference that `MediaImage` and image settings resolve.

**Example**

```tsx
import { MediaImage, asset } from '@poltura/theme-sdk/media';

export function Logo() {
  return <MediaImage image={asset('images/logo.png')} role='logo' alt='' />;
}
```

## `mediaUrl` [#mediaurl]

The URL of one rendition of a stored image; any other URL comes back as it is.

```ts
mediaUrl(src: string, role: MediaRole): string
```

**Parameters**

- `src: string`: The stored image URL.
- `role: MediaRole`: The rendition to load.

**Returns:** The rendition's URL, or `src` itself when it is not a store image.
