APIsChangelog
Log In

Get All Assets

webflow.getAllAssets()

Retrieve all assets on a site.

Syntax

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

Returns

Promise<Asset[]>

A Promise that resolves to an array of Assets.

Example

// Get all assets
const assets = await webflow.getAllAssets()

// Loop to list assets in the console
for (const asset of assets) {
  const name = await asset.getName()
  const mimeType = await asset.getMimeType()
  console.log(name, mimeType)
}

Designer Ability

Checks for authorization only

Designer AbilityLocaleBranchWorkflowSitemode
canAccessAssetsanyanyanyany