Designer API
Control the Webflow Designer
asset.getAltText()
This method retrieves the Alt Text for a specific Asset.
1asset.getAltText(): Promise<string>
Promise<string>
A Promise that resolves to the Alt Text string.
1// Get Asset by ID2const asset = await webflow.getAssetById(asset_id)3console.log(asset)45if (asset) {6 // Get asset URL7 const altText = await asset.getAltText()8 console.log(`Asset Alt Text: ${altText}`)9}
Try this example
Checks for authorization only