Help

Base64 Image Upload to Airtable API Appears Broken or Tiny

471 5
cancel
Showing results for 
Search instead for 
Did you mean: 
Autive
4 - Data Explorer
4 - Data Explorer

Hello Airtable Community,

I am trying to upload an image via Base64 encoding using Airtable’s uploadAttachment API, but the uploaded image appears as a broken placeholder or a very tiny image instead of displaying properly.

Autive_1-1738163620790.png

Screenshot 2025-01-29 at 8.40.53 AM.png

🔹 My Setup:

  • Using Base64 encoding instead of a direct file URL.
  • Posting via API to Airtable’s /uploadAttachment endpoint.
  • The request is successfully received by Airtable, but the image does not display properly.

🔹 Payload I’m Sending:

{ "contentType": "image/jpeg", "file": "BASE64_ENCODED_STRING_HERE", "filename": "example.jpg" }

 


🔹 What I Have Tried So Far:

Verified the Base64 Encoding

  • Tested the Base64 string in an online decoder → it renders correctly.
  • Confirmed the Base64 string is complete (not truncated).

Checked API Response

  • Airtable successfully processes the request.
  • The returned JSON includes a url for the image, but it does not display correctly.

Attempted Fixes:

  • Tried adding data:image/jpeg;base64, before the string → Same issue.
  • Tried different formats (image/png instead of image/jpeg) → No change.
  • Tested with different images → Same issue.
5 Replies 5

When uploading an attachment, you need to provide a publicly accessible URL to where the file is hosted, not a Base64 encoded string of the image. You may need to use a third party service to temporarily host the file.

@kuovonne Airtable added a new API endpoint that now accepts Base64 files. Here’s the link: https://airtable.com/developers/web/api/upload-attachment

But the document says this 

Autive_0-1738181266125.png

 

Yeah, I am using the same endpoint, but it is Uploading the image as I mentioned the screenshot above.

Oh, cool! Thanks for letting me know about this new feature.

In this case, I recommend submitting a request to Airtable support directly.

Have you tried expanding the thumbnail to see if the full image is attached, even though there is no thumbnail? It could be that the problem is with the thumbnail creation versus actually uploading the attachment.