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
      • Create an Asset
      • Get All Assets
      • Get Asset by ID
  • Pages & Folders
  • Utilities
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • webflow.getAllAssets()
  • Syntax
  • Returns
  • Example
  • Designer Ability
AssetsCreating & Retrieving Assets

Get All Assets

Was this page helpful?
Previous

Get Asset by ID

Next
Built with

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}

Try this example

Designer Ability

Checks for authorization only

Designer AbilityLocaleBranchWorkflowSitemode
canAccessAssetsanyanyanyany