# com.blueyvatar.image

> One image. By default an avatar; see purpose for gallery images. The blob holds the full original (long edge up to 4096 pixels). The optional crop says which square of it to show; without one, delivery takes the center square. The blob size limit matches the reference PDS default, so an image above the app.bsky.actor.profile#avatar limit of 1,000,000 bytes cannot be reused there as is.

- Kind: record
- Record key: tid
- Authority: blueyvatar.com
- Lexicon: 1
- Published by [blueyvatar.com](https://lexicon.garden/identity/did:plc:jkfpo6wxvqyf6nzp3bmrkszh), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:jkfpo6wxvqyf6nzp3bmrkszh/com.blueyvatar.image)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:jkfpo6wxvqyf6nzp3bmrkszh/com.blueyvatar.image/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:jkfpo6wxvqyf6nzp3bmrkszh/com.blueyvatar.image/analytics)

## Record (`com.blueyvatar.image`)

Type: record · key tid

### Properties

- `alt` (string)
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `caption` (string): Gallery caption.
  - Constraints: maxLength: 1400, maxGraphemes: 140
- `createdAt` (string · datetime, required)
- `crop` (ref): Square region of the image to show. Absent means the center square.
  - Reference: `lex:com.blueyvatar.image#crop`
- `image` (blob, required)
  - Constraints: maxSize: 5242880, accept: image/png, image/jpeg
- `isDefault` (boolean)
- `labels` (union)
  - One of: `lex:com.atproto.label.defs#selfLabels`
- `license` (string): Deprecated. No longer written or shown; readers ignore it. Older records may still carry a value, and nothing removes it from a repository.
  - Constraints: knownValues: personal | cc-by | cc-by-nc | all-rights-reserved
- `purpose` (string): What the image is for. A missing value means avatar. Gallery images never resolve as an avatar.
  - Constraints: maxLength: 32, knownValues: avatar | gallery
- `sort` (integer): Gallery order, lowest first. Images without a value follow, newest first.

## #crop (`com.blueyvatar.image#crop`)

Type: object

A square region of the image. Records cannot hold fractions, so each value is an integer in units of 1/10000 of the image (10000 is the whole). Measured on the image as displayed, with any EXIF orientation applied.

### Properties

- `size` (integer, required): Side length, as a fraction of the shorter side. 10000 is the whole short side.
  - Constraints: minimum: 1, maximum: 10000
- `x` (integer, required): Left edge, as a fraction of the image width.
  - Constraints: minimum: 0, maximum: 10000
- `y` (integer, required): Top edge, as a fraction of the image height.
  - Constraints: minimum: 0, maximum: 10000

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "crop": {
      "description": "A square region of the image. Records cannot hold fractions, so each value is an integer in units of 1/10000 of the image (10000 is the whole). Measured on the image as displayed, with any EXIF orientation applied.",
      "properties": {
        "size": {
          "description": "Side length, as a fraction of the shorter side. 10000 is the whole short side.",
          "maximum": 10000,
          "minimum": 1,
          "type": "integer"
        },
        "x": {
          "description": "Left edge, as a fraction of the image width.",
          "maximum": 10000,
          "minimum": 0,
          "type": "integer"
        },
        "y": {
          "description": "Top edge, as a fraction of the image height.",
          "maximum": 10000,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "x",
        "y",
        "size"
      ],
      "type": "object"
    },
    "main": {
      "description": "One image. By default an avatar; see purpose for gallery images. The blob holds the full original (long edge up to 4096 pixels). The optional crop says which square of it to show; without one, delivery takes the center square. The blob size limit matches the reference PDS default, so an image above the app.bsky.actor.profile#avatar limit of 1,000,000 bytes cannot be reused there as is.",
      "key": "tid",
      "record": {
        "properties": {
          "alt": {
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "caption": {
            "description": "Gallery caption.",
            "maxGraphemes": 140,
            "maxLength": 1400,
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "crop": {
            "description": "Square region of the image to show. Absent means the center square.",
            "ref": "lex:com.blueyvatar.image#crop",
            "type": "ref"
          },
          "image": {
            "accept": [
              "image/png",
              "image/jpeg"
            ],
            "maxSize": 5242880,
            "type": "blob"
          },
          "isDefault": {
            "type": "boolean"
          },
          "labels": {
            "refs": [
              "lex:com.atproto.label.defs#selfLabels"
            ],
            "type": "union"
          },
          "license": {
            "description": "Deprecated. No longer written or shown; readers ignore it. Older records may still carry a value, and nothing removes it from a repository.",
            "knownValues": [
              "personal",
              "cc-by",
              "cc-by-nc",
              "all-rights-reserved"
            ],
            "type": "string"
          },
          "purpose": {
            "description": "What the image is for. A missing value means avatar. Gallery images never resolve as an avatar.",
            "knownValues": [
              "avatar",
              "gallery"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "sort": {
            "description": "Gallery order, lowest first. Images without a value follow, newest first.",
            "type": "integer"
          }
        },
        "required": [
          "image",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "com.blueyvatar.image",
  "lexicon": 1
}
```
