# Image block

Displays an image, with an optional title above it.

| | |
|---|---|
| **Type** | `image` |
| **Available in** | Messages, Modals, Home tab |

## Fields

| Field | Type | Description | Required? |
|---|---|---|---|
| `type` | String | The type of block. For an image block, `type` is always `image`. | Required |
| `alt_text` | String | A plain-text summary of the image, without markup. Maximum 2000 characters. | Required |
| `image_url` | String | The http(s) URL of a publicly hosted image (`png`, `jpg`, `jpeg`, `gif`). Maximum 3000 characters. | Required |
| `title` | [Text object](https://workstation.repzo.com/docs/developers/block-kit/objects/text-object) | A title shown above the image, as a `plain_text` text object. Maximum 2000 characters. | Optional |
| `block_id` | String | A unique identifier for the block. Maximum length is 255 characters. It must be unique within the message or view — a duplicate is replaced and reported as a warning. | Optional |

> **How Repzo Chat differs from Slack**
>
> - `slack_file` isn't supported — host the image and pass `image_url`.
> - Only http(s) URLs are shown.

## Examples

### An image with a title

```json
{
  "blocks": [
    {
      "type": "image",
      "title": {
        "type": "plain_text",
        "text": "Shelf audit — Store 12, aisle 4"
      },
      "image_url": "https://picsum.photos/id/292/800/500",
      "alt_text": "Store shelf photographed during the audit"
    }
  ]
}
```

### An image without a title

```json
{
  "blocks": [
    {
      "type": "image",
      "image_url": "https://picsum.photos/id/48/800/450",
      "alt_text": "Office meeting room set up for the quarterly review"
    }
  ]
}
```

## Related

- [Blocks](https://workstation.repzo.com/docs/developers/block-kit/blocks)
- [Block Kit overview](https://workstation.repzo.com/docs/developers/block-kit)
