# pub.leaflet.blocks.imageGallery

> Published by [leaflet.pub](https://lexicon.garden/identity/did:plc:btxrwcaeyodrap5mnjw2fvmz)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:btxrwcaeyodrap5mnjw2fvmz/pub.leaflet.blocks.imageGallery)
- [Documentation](https://lexicon.garden/lexicon/did:plc:btxrwcaeyodrap5mnjw2fvmz/pub.leaflet.blocks.imageGallery/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:btxrwcaeyodrap5mnjw2fvmz/pub.leaflet.blocks.imageGallery/examples)

## Definitions

### `pub.leaflet.blocks.imageGallery`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `gap` | `integer` | No | Gap between images in pixels. |
| `format` | `string` | No |  |
| `images` | `array` | Yes |  |
| `maxWidth` | `integer` | No | Max width per image in grid view (px); drives how many columns fit. |

### `pub.leaflet.blocks.imageGallery#image`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `alt` | `string` | No | Alt text description of the image, for accessibility. |
| `image` | `blob` | Yes |  |
| `aspectRatio` | `ref` → `#aspectRatio` | Yes |  |

### `pub.leaflet.blocks.imageGallery#aspectRatio`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `width` | `integer` | Yes |  |
| `height` | `integer` | Yes |  |

## Raw Schema

```json
{
  "id": "pub.leaflet.blocks.imageGallery",
  "defs": {
    "main": {
      "type": "object",
      "required": [
        "images"
      ],
      "properties": {
        "gap": {
          "type": "integer",
          "description": "Gap between images in pixels."
        },
        "format": {
          "type": "string",
          "knownValues": [
            "grid",
            "carousel",
            "strip"
          ]
        },
        "images": {
          "type": "array",
          "items": {
            "ref": "#image",
            "type": "ref"
          }
        },
        "maxWidth": {
          "type": "integer",
          "description": "Max width per image in grid view (px); drives how many columns fit."
        }
      }
    },
    "image": {
      "type": "object",
      "required": [
        "image",
        "aspectRatio"
      ],
      "properties": {
        "alt": {
          "type": "string",
          "description": "Alt text description of the image, for accessibility."
        },
        "image": {
          "type": "blob",
          "accept": [
            "image/*"
          ],
          "maxSize": 1000000
        },
        "aspectRatio": {
          "ref": "#aspectRatio",
          "type": "ref"
        }
      }
    },
    "aspectRatio": {
      "type": "object",
      "required": [
        "width",
        "height"
      ],
      "properties": {
        "width": {
          "type": "integer"
        },
        "height": {
          "type": "integer"
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
