Skip to content

Media Gallery

type: 12 Messages

The Media Gallery shows 1 to 10 images or videos automatically arranged in a grid.

Preview
My BotAPPToday at 12:00 PM

📸 Trip photos

payload.json
{
"flags": 32768,
"components": [
{
"type": 10,
"content": "### 📸 Trip photos"
},
{
"type": 12,
"items": [
{
"media": {
"url": "attachment://mountains.png"
},
"description": "Mountains at sunrise"
},
{
"media": {
"url": "attachment://sunset.png"
},
"description": "Sunset"
},
{
"media": {
"url": "attachment://ocean.png"
},
"description": "The sea"
},
{
"media": {
"url": "attachment://forest.png"
},
"description": "The forest"
},
{
"media": {
"url": "attachment://night.png"
},
"description": "Night sky",
"spoiler": true
}
]
}
]
}
Field Type Description
type integer required Always 12.
id integer optional Unique identifier.
items array of items required 1 to 10 items.
Field Type Description
media unfurled media item required { "url": "..." } with https:// or attachment://.
description string optional Alt text. Max 1024 characters.
spoiler boolean optional Hide as a spoiler. Defaults to false.

Send the images as multipart/form-data (see Getting started) or use https:// URLs.

Discord picks the grid based on how many items there are:

Items Approximate layout
1 One large image
2 Two columns
3 One large and two small
4 2×2 grid
5 to 10 Rows of 2 and 3 columns