# Image

> Single media item in a gallery or a thumbnail accessory.

- ID: `advmsgcmp_media_image`
- Type: Block
- Category: [Advanced Messages](https://inventor.bot/docs/reference/blocks/advanced-messages.md)

- Can only be placed inside `advmsgcmp_layout_section` (accessory), `advmsgcmp_layout_gallery` (children).

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `url` | yes | URL of the media item. | e.g. `"https://example.com/media.png"` |
| `description` |  | Alt text for the media, max 1024 characters. | e.g. `"A beautiful sunset over the ocean."` |
| `spoiler` |  | Whether the media item should be a spoiler. | e.g. `"true"` |

**Example**

```go
advmsgcmp_layout_section(Args{
	accessory: func() {
		advmsgcmp_media_image(Args{url: "https://example.com/media.png"})
	},
})
```

## Placement

Can only be placed inside:

- [Section](https://inventor.bot/docs/reference/blocks/advanced-messages/advmsgcmp-layout-section.md) (`advmsgcmp_layout_section`), in `accessory`
- [Gallery](https://inventor.bot/docs/reference/blocks/advanced-messages/advmsgcmp-layout-gallery.md) (`advmsgcmp_layout_gallery`), in `children`