> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainlit.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Image

The `Image` class is designed to create and handle image elements to be sent and displayed in the chatbot user interface.

You must provide either an url or a path or content bytes.

## Attributes

<ParamField path="name" type="str">
  The name of the image to be displayed in the UI.
</ParamField>

<ParamField path="display" type="ElementDisplay" optional>
  Determines how the image element should be displayed in the UI. Choices are
  "side", "inline", or "page".
</ParamField>

<ParamField path="size" type="ElementSize" optional>
  Determines the size of the image. Only works with display="inline". Choices
  are "small", "medium" (default), or "large".
</ParamField>

<ParamField path="url" type="str" optional>
  The remote URL of the image source.
</ParamField>

<ParamField path="path" type="str" optional>
  The local file path of the image.
</ParamField>

<ParamField path="content" type="bytes" optional>
  The file content of the image in bytes format.
</ParamField>

## Example

```python theme={null}
import chainlit as cl


@cl.on_chat_start
async def start():
    image = cl.Image(path="./cat.jpeg", name="image1", display="inline")

    # Attach the image to the message
    await cl.Message(
        content="This message has an image!",
        elements=[image],
    ).send()
```
