# Enable Chat Attachments (Webchat 2.0)

> \[!WARNING]
>
> Webchat 2.0 is no longer supported. It uses Flex UI 1.x.x's [legacy messaging](/docs/flex/developer/messaging), which has reached end-of-life.
>
> If you are using Webchat 2.0, [migrate to Webchat 3.x.x](/docs/flex/developer/conversations/webchat/migrate).
>
> If you are starting out with Webchat, build with [Webchat 3.x.x](/docs/flex/developer/conversations/webchat) instead.

> \[!NOTE]
>
> This Twilio product is currently available as a **Public** **Beta** release. Some features are not yet implemented and others may be changed before the product is declared as Generally Available. **Beta products are not covered by a Twilio SLA**. [Learn more about beta product support](https://help.twilio.com/articles/115002413087-Twilio-Beta-Product-Support).

Attachment support in the Flex UI allows agents and customers to share files such as documents and images over a chat channel. To enable the web chat attachment pilot you'll need to be on `Flex UI 1.20` and `Flex Web Chat 2.5`.

You have to enable chat attachments in both the Flex UI and Web Chat UI.

![Web chat showing a request for a bill document attachment between Damien Smith and Robert Ryan.](https://docs-resources.prod.twilio.com/b702ba9d0baccff877d7d4d1fed966c42ab050e541d117d3b4371f29191d0c1e.jpg)

## Enable attachments in Flex UI

To turn on chat attachments in Flex UI:

1. From Twilio Console, navigate to the [**Opt-in features**](https://console.twilio.com/us1/develop/flex/settings/features) page.
2. On the **Beta** tab, turn on **Image and file sharing for WebChat**.

## Enable attachments in Webchat UI

To enable sending attachments between agents and customers, add the following code to Flex Web Chat UI **webchat-appConfig.js** configuration files.

```javascript
fileAttachment: {
  enabled: true
}
```

## Enable read-only mode for Flex UI or WebChat UI

If you want to limit users (customers or agents) from sending attachments but still want them to be able to see and download attachments sent to them, configure attachments to be in `readOnly` mode.

```javascript
fileAttachment: {
  readOnly: true
}
```

## Default configuration

The default configuration allows the following files types. Individual files can be up to 10Mb in size.

| Images                  | Documents  |
| ----------------------- | ---------- |
| .jpeg, .jpg, .png, .gif | .txt, .pdf |

## Next steps

* [Customize your Webchat attachments](/docs/flex/developer/messaging/webchat/customize-attachment-behavior)
* Learn how to [send and receive attachments](/docs/flex/end-user-guide/chat-attachments)
* Learn more about [Programmable Chat Media Support](/docs/chat/media-support)
