# Class LittleGhost::Content::Image

Documentation version: Edge

Canonical HTML: https://littleghostai.org/docs/LittleGhost/Content/Image.html

Contains binary image data, its MIME media type, and an optional display name.
Content.serialize base64-encodes `data` in the serialized Hash.

## Inheritance

`LittleGhost::Content::Image < Data`

## Attributes

<a id="attribute-i-data"></a>
### `data` (R)

The original binary image bytes.

<a id="attribute-i-media_type"></a>
### `media_type` (R)

The image MIME type, such as `image/png`.

<a id="attribute-i-name"></a>
### `name` (R)

The optional filename or label used when the image is presented.

## Class methods

<a id="method-c-new"></a>
### `.new`

```ruby
new(data:, media_type:, name: nil) -> Image
```

Wraps the supplied values without copying them.
