# so.sprk.media.image

> Published by [sprk.so](https://lexicon.garden/identity/did:plc:cveom2iroj3mt747sd4qqnr2)

✓ This is the authoritative definition for this NSID.

## Description

An image in a Spark record.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:cveom2iroj3mt747sd4qqnr2/so.sprk.media.image)
- [Documentation](https://lexicon.garden/lexicon/did:plc:cveom2iroj3mt747sd4qqnr2/so.sprk.media.image/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:cveom2iroj3mt747sd4qqnr2/so.sprk.media.image/examples)

## Definitions

### `so.sprk.media.image`

**Type**: `object`

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

### `so.sprk.media.image#view`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `alt` | `string` | Yes | Alt text description of the image, for accessibility. |
| `thumb` | `string` (uri) | Yes | Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. |
| `fullsize` | `string` (uri) | Yes | Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. |
| `aspectRatio` | `ref` → `so.sprk.media.defs#aspectRatio` | No |  |

## Raw Schema

```json
{
  "id": "so.sprk.media.image",
  "defs": {
    "main": {
      "type": "object",
      "required": [
        "image",
        "alt"
      ],
      "properties": {
        "alt": {
          "type": "string",
          "description": "Alt text description of the image, for accessibility."
        },
        "image": {
          "type": "blob",
          "accept": [
            "image/*"
          ],
          "maxSize": 5242880
        },
        "aspectRatio": {
          "ref": "so.sprk.media.defs#aspectRatio",
          "type": "ref"
        }
      }
    },
    "view": {
      "type": "object",
      "required": [
        "thumb",
        "fullsize",
        "alt"
      ],
      "properties": {
        "alt": {
          "type": "string",
          "description": "Alt text description of the image, for accessibility."
        },
        "thumb": {
          "type": "string",
          "format": "uri",
          "description": "Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View."
        },
        "fullsize": {
          "type": "string",
          "format": "uri",
          "description": "Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View."
        },
        "aspectRatio": {
          "ref": "so.sprk.media.defs#aspectRatio",
          "type": "ref"
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "description": "An image in a Spark record."
}
```
