Working with Assets

Webflow’s asset APIs allow you to upload and manage a site’s assets. Once Assets are uploaded to a site, they are available for use

Learn more about Assets in Webflow in our support documentation.

These APIs allow developers crate integrations that upload and/or sync with external file management systems like Digital Asset Managers (DAMs). Keeping these systems in sync ensures that site designers and content managers have the assets they need when working within the Webflow Designer.

Important

Files you upload to the Assets panel are not restricted — that is, they are publicly available and discoverable, but won’t necessarily be discovered or indexed by search engines if the file isn’t on a publicly viewable webpage or linked elsewhere. Learn more about asset privacy in Webflow.

FAQs

  • PNG
  • JPEG and JPG
  • GIF
  • SVG
  • WebP
  • AVIF

Yes, uploaded assets must adhere to specific size limitations:

  • Images must not exceed 4MB
  • Documents are capped at 10MB

When uploading a file, Webflow requires an MD5 hash generated from the contents of the file to ensure data integrity and manage duplicate assets.

What is a cryptographic hash?

A cryptographic hash, also often referred to as a “digest”, “fingerprint” or “signature”, is an almost perfectly unique string of characters that is generated from a separate piece of input text. —boot.dev

A cryptographic hash is the result of a hashing algorithm, which deterministically converts input data into an output of fixed length, regardless of input size.

What are cryptographic hashes used for?

Hashes serve a range of purposes, from verifying data integrity and enabling fast lookups in databases, to efficiently identifying duplicates. Let’s break down what that looks like when uploading a file to Webflow and including an MD5 hash:

1

Generate the file hash

Before uploading, use the MD5 hashing algorithm to convert the binary contents of your file into a 128-bit hash. This hash will serve as the fileHash value.

2

Provide the hash on upload

When creating a new asset in Webflow, include this generated fileHash with a request to the Create Asset Metadata endpoint.

3

Webflow uses the hash for de-duplication

Webflow uses the fileHash as a unique identifier to prevent duplicate uploads. If a hash matches an existing file’s hash, Webflow avoids redundant storage, optimizing resources.

4

Lookup and verification

Webflow may use the fileHash as a lookup key to quickly retrieve or verify file data, ensuring consistency across operations.

What we’ll build

In this tutorial, we’ll build an example script that:

  • Creates asset folders on a site
  • Uploads a new image to an Webflow with a MD5 hash
  • Organizes the image within a site’s asset folders

Prerequisites

  • A Webflow site in your development Workspace
  • A Webflow App or site token with the following scopes: assets:read, assets:write
  • Some knowledge of Node.js and/or Python

Conclusion

Congratulations! You’ve just programmatically created asset folders and uploaded assets to a Webflow site. These assets can now be organized and used across the site by designers and editors of Webflow projects.

Looking for more things to try with the API? Check out:

Was this page helpful?
Built with