How to use the API to upload Images

Hello,

I cannot find resources on that, some said that webflow’s API now includes image management, but i didn’t find how.

My use case: I am building a collection involving image fields. The collection is expected to be of more than 1000 items. I would like to automate the upload/updates on it, from an Airtable base (connection with make.com), containing all the info.

My issue is to upload/update the image resource on a collection item, I don’t find a way to do it. Has anyone done that before ?

Thanks by advance for your help !
Louis

The confusion with this may come down to semantics.

  • You cannot upload an image into the CMS via the CMS API.

  • But you can upload an image URL into the CMS via the CMS API.

Meaning, the image needs to be hosted and publicly available somewhere else, first. For example, if you’ve uploaded your image to cloudfront:

https://d1otoma47x30pg.cloudfront.net/580e63fc8c9a982ac9b8b744/580e63fe8c9a982ac9b8b749_1477338110257-image20.jpg

Then you can send that URL in the Webflow API when you create or update a CMS item:

"main-image": {
    "fileId": "580e63fe8c9a982ac9b8b749",
    "url": "https://d1otoma47x30pg.cloudfront.net/580e63fc8c9a982ac9b8b744/580e63fe8c9a982ac9b8b749_1477338110257-image20.jpg"
  },

In your case if you have images uploaded (or the URL stored) within Airtable, you just need to send the publicly accessable URL to them when you use the Webflow CMS API.

As Chris said, you need to use the Airtable attachment URLs as the Webflow Image field value.

If you’re looking for an easier solution than Make to do it, give PowerImporter a try. It is custom made to sync all your Airtable fields to your Webflow CMS, including image and file fields.

1 Like

Thanks ! yes, that’s what i thought… And it seems to work! Thanks a lot for your help :slight_smile: