Skip to main content

Base64 Image Upload to Airtable API Appears Broken or Tiny

  • January 29, 2025
  • 5 replies
  • 18 views

Forum|alt.badge.img+2
  • New Participant
  • 2 replies

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.

🔹 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

kuovonne
Forum|alt.badge.img+27
  • Brainy
  • 6002 replies
  • January 29, 2025

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.


ScottWorld
Forum|alt.badge.img+33
  • Brainy
  • 8792 replies
  • January 29, 2025

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


Forum|alt.badge.img+2
  • Author
  • New Participant
  • 2 replies
  • January 29, 2025
kuovonne wrote:

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.


But the document says this 

 


Forum|alt.badge.img+2
  • Author
  • New Participant
  • 2 replies
  • January 30, 2025
ScottWorld wrote:

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


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


kuovonne
Forum|alt.badge.img+27
  • Brainy
  • 6002 replies
  • January 30, 2025

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.


Reply