webflow.getAllAssets()

Retrieve all assets on a site.

Syntax

1webflow.getAllAssets(): Promise<Asset[]>

Returns

Promise<Asset[]>

A Promise that resolves to an array of Assets.

Example

1// Get all assets
2const assets = await webflow.getAllAssets()
3
4// Loop to list assets in the console
5for (const asset of assets) {
6 const name = await asset.getName()
7 const mimeType = await asset.getMimeType()
8 console.log(name, mimeType)
9}

Designer Ability

Checks for authorization only

Designer AbilityLocaleBranchWorkflowSitemode
canAccessAssetsanyanyanyany