> This page is for Designer API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# Get Alt Text

> Retrieve the Alt Text for an Image element on the canvas.

## `element.getAltText()`

Retrieve the alt text for an Image element on the canvas. If the Image element doesn't have alt text, the API will retrieve the alt text from the associated Asset.

## Syntax

```typescript
element.getAltText(): Promise<string>
```

## Returns

**Promise\<*String*>**

A Promise that resolves to the string of alt text.

## Example

```typescript
// Get Selected Element
const el = await webflow.getSelectedElement()
if (el?.type === 'Image') {
  // Get alt text
  const alt = await el.getAltText()
  console.log(alt)
} else {
  console.error('Please select an image element')
  await webflow.notify({
    type: 'Error',
    message: 'Please select an Image Element',
  })
}
```

## Designer Ability

Checks for authorization only

| Designer Ability | Locale | Branch | Workflow | Sitemode |
| :--------------- | :----- | :----- | :------- | :------- |
| canAccessAssets  | any    | any    | any      | any      |

```
```