Streaming live at 10am (PST)

Is there a file size limit for images being uploaded using Webflow API?

Hey guys,

I have a python script to post/patch fields on new or existing items, including image URL…as documented here: http://developers.webflow.com/#images.

I’m having issues with posting/patching the image field with an image URL. While a few image URLs get uploaded correctly, most are ignored. All images are .PNG, and are retrieved for the same URL structure.

THIS WORKS:

THIS DOES NOT:

I noticed that images that make it, are smaller in size. Is that the reason? Is there a file size limit with uploading images with an API call? If so, what is the limit?

I’m actually not too sure about this either, given that the image that works is 10KB and the one that doesn’t is only 30KB. Any other issue that could cause this?

Thanks!
Happy Lorem Ipsum


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

FIle upload for images is limited to 4MB so this should be the same for the API. Hard to say what the issue is without code example.

Hey Jeff! Thanks for the quick response. Here’s some code example, and some more details.



#Contruct API URL
url = “https://api.webflow.com/collections/” + wf_cid + “/items/” + wf_id
body = {
“fields”: {
“_archived”: “False”,
“_draft”: “False”,
“name”: name,
“company-logo”: {“alt”: company_logo_alt,
“fileId”: company_fileId,
“url”: company_logo_url},
}
}
body = json.dumps(body)
response = requests.patch(url, headers=headers, data=body)
print(json.dumps(response.json(), indent=4, ))

If I PATCH the same webflow item within the same collection list, one image works, but the other does not! Both images are pngs, under 4MB, and stored on amazon servers.

  1. company_logo_url = “https://lever-client-logos.s3.us-west-2.amazonaws.com/b8300af6-ed1c-4d0b-8956-cee7839555b9-1599675095718.png
    THIS WORKS,… and I get a valid response showing me the Image fileID, and “uploads-ssl.webflow.com” image path.

  2. company_logo_url = “https://lever-client-logos.s3-us-west-2.amazonaws.com/ab632a12-a240-490f-b485-53b145a7c9eb-1585250309274.png
    THIS DOES NOT WORK! Why?

I’ve also tried passing an alt attribute, but that does not seem to fix it. Been banging my head on this issue for the last couple of days…

Any hints? We’re quire blocked on this last issue…:confused: