For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Designer API
    • Introduction
    • Getting Started
    • Webflow CLI
    • Error Handling
    • App Modes
  • Elements
    • Creating & Retrieving Elements
    • Element Properties & Methods
    • Element Types & Methods
  • Styles
    • Managing Style Properties
    • Managing Variable Modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
  • Assets
      • Get Asset Name
      • Set Asset Name
      • Get Alt Text
      • Set Alt Text
      • Set Asset File
      • Get Asset MIME Type
      • Get Asset URL
      • Get folder of Asset
      • Set folder for Asset
  • Pages & Folders
  • Utilities
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • asset.getAltText()
  • Syntax
  • Returns
  • Example
  • Designer Ability
AssetsManaging Assets

Get Alt Text

Was this page helpful?
Previous

Set Alt Text

Next
Built with

asset.getAltText()

This method retrieves the Alt Text for a specific Asset.

Syntax

1asset.getAltText(): Promise<string>

Returns

Promise<string>

A Promise that resolves to the Alt Text string.

Example

1// Get Asset by ID
2const asset = await webflow.getAssetById(asset_id)
3console.log(asset)
4
5if (asset) {
6 // Get asset URL
7 const altText = await asset.getAltText()
8 console.log(`Asset Alt Text: ${altText}`)
9}

Try this example

Designer Ability

Checks for authorization only

Designer AbilityLocaleBranchWorkflowSitemode
canAccessAssetsanyanyanyany