# Multi-Image Combination Component

Feishu cards support multi-image combination components. You can call the [Upload Image](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/create) API or upload images in the new version of the Feishu card building tool, and enter the obtained image key into the multi-image combination component to enrich the card content.

![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/fb315779524d13ae504b7b7252acfd49_Bc8bJyGzyt.png?height=390&lazyload=true&maxWidth=300&width=559)

## Use Cases

In content delivery scenarios, you may need to organize and arrange multiple images within a card. In this case, you can use the multi-image combination component, choose the image combination mode, and quickly build a multi-image style.

Double Image Combination | Triple Image Combination | Quad Grid
---|---|---
&nbsp; | &nbsp; | &nbsp;
Six Grid | Nine Grid | &nbsp;
&nbsp; | &nbsp;

## Precautions

To ensure clarity in the chat window, it is recommended that the images uploaded in the component adhere to the following specifications:

- Image dimensions within the range of 1500 × 3000 px.
- Image size no more than 10 MB.
- Image `height:width` ratio not exceeding `16:9`.

## JSON Structure

The complete JSON data for the multi-image combination is as follows:
```json
{
  "tag": "img_combination",
  "combination_mode": "double", // Mode of the image combination.
  "corner_radius": "12px", // Corner radius for the images in the combination, in pixels (px).
  "img_list": [
    // Array of image resources, in order with the arrangement of the images.
    {
      "img_key": "img_v3_0239_8347760e-3173-4072-b1aa-e4e7c835741j"
    },
    {
      "img_key": "img_v3_0239_d9a9b734-57f8-4247-baf3-ae178b55f96j"
    }
  ]
}
```
## Field Descriptions
The field descriptions for the multi-image combination component are listed in the table below.

Parameter | Required | Type | Default Value | Description
---|---|---|---|---
tag | Yes | String | / | Label of the multi-image combination component, fixed value: img_combination.
combination_mode | Yes | String | empty | Modes of the image combination, possible values:<br>- double: Double image combination, can arrange up to two images.<br>- triple: Triple image combination, can arrange up to three images.<br>- bisect: Evenly divided double column combination, each row two equally-sized square images, up to three rows, i.e., six images.<br>- trisect: Evenly divided triple column combination, each row three equally-sized square images, up to three rows, i.e., nine images.<br>Note:<br>If the number of uploaded images exceeds the limit of the combination mode, the system will display the images according to the order of upload, prioritizing the images arranged earlier. Images exceeding the limit will not be displayed.<br>If the number of uploaded images is less than the limit of the combination mode, the unarranged parts will remain blank.
corner_radius | No | String | / | Corner radius for the images in the combination, in pixels (px). Values follow this format:<br>[0,∞]px<br>[0,100]%
img_list | Yes | Object | empty | Array of img_key for the image resources, in order with the arrangement of the images.
└ img_key | Yes | String | / | Key of the image resource. You can obtain this by calling the Upload Image API or by uploading images in the building tool.

## Example Code

### Double Image Mixed Layout Example

Replace the `img_key` in the following example code with the actual image key to achieve the card effect shown in the example image:

![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/8a03a4edd6a0813bced92cd383061ab8_6AePbfDCGW.png?height=506&lazyload=true&maxWidth=400&width=1081)

```json
{
  "elements": [
    {
      "tag": "img_combination",
      "combination_mode": "double",
      "img_list": [
        {
          "img_key": "img_v2_4c772db0-9aff-4eba-bbf4-6e6121cabcef"
        },
        {
          "img_key": "img_v2_4c772db0-9aff-4eba-bbf4-6e6121cabcef"
        }
      ]
    }
  ]
}
```

### Triple Image Mixed Layout Example

Replace the `img_key` in the following example code with the actual image key to achieve the card effect shown in the example image:

![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/fb315779524d13ae504b7b7252acfd49_cQR9wIHOXZ.png?height=390&lazyload=true&maxWidth=400&width=559)

```json
{
  "elements": [
    {
      "tag": "img_combination",
      "combination_mode": "triple",
      "img_list": [
        {
          "img_key": "img_v2_4c772db0-9aff-4eba-bbf4-6e6121cabcef"
        },
        {
          "img_key": "img_v2_4c772db0-9aff-4eba-bbf4-6e6121cabcef"
        },
        {
          "img_key": "img_v2_4c772db0-9aff-4eba-bbf4-6e6121cabcef"
        }
      ]
    }
  ]
}
```

### **Equally Divided Double Column Layout Example**

Replace the `img_key` in the following example code with the actual image key to achieve the card effect shown in the example image:

![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/02236d7183ff1ca900ffc37dbec338dc_FpogForok4.png?height=819&lazyload=true&maxWidth=400&width=559)

```json
{
  "elements": [
    {
      "tag": "img_combination",
      "combination_mode": "bisect",
      "img_list": [
        {
          "img_key": "img_v2_4c772db0-9aff-4eba-bbf4-6e6121cabcef"
        },
        {
          "img_key": "img_v2_4c772db0-9aff-4eba-bbf4-6e6121cabcef"
        },
        {
          "img_key": "img_v2_4c772db0-9aff-4eba-bbf4-6e6121cabcef"
        },
        {
          "img_key": "img_v2_4c772db0-9aff-4eba-bbf4-6e6121cabcef"
        },
        {
          "img_key": "img_v2_4c772db0-9aff-4eba-bbf4-6e6121cabcef"
        },
        {
          "img_key": "img_v2_4c772db0-9aff-4eba-bbf4-6e6121cabcef"
        }
      ]
    }
  ]
}
```

### Equally Divided Triple Column Layout Example

Replace the `img_key` in the following example code with the actual image key to achieve the card effect shown in the example image:

![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/7473f1d9907913c279f796e6022f7a95_Z5qFUWHIbL.png?height=212&lazyload=true&maxWidth=400&width=559)
```json
{
  "elements": [
    {
      "tag": "img_combination",
      "combination_mode": "trisect",
      "img_list": [
        {
          "img_key": "img_v2_4c772db0-9aff-4eba-bbf4-6e6121cabcef"
        },
        {
          "img_key": "img_v2_4c772db0-9aff-4eba-bbf4-6e6121cabcef"
        },
        {
          "img_key": "img_v2_4c772db0-9aff-4eba-bbf4-6e6121cabcef"
        }
      ]
    }
  ]
}
```