# Encode an Image from Camera to Base64

**URL:** <https://community.thunkable.com/t/encode-an-image-from-camera-to-base64/2796384>\
**Category:** Questions about Thunkable X\
**Created:** [January 22, 2024, 1:13pm UTC](https://community.thunkable.com/t/encode-an-image-from-camera-to-base64/2796384 "2024-01-22T13:13:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lodgical.lodgeb](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@lodgical.lodgeb](https://community.thunkable.com/u/lodgical.lodgeb)\
**Post date:** [January 22, 2024, 1:13pm UTC](https://community.thunkable.com/t/encode-an-image-from-camera-to-base64/2796384/1 "2024-01-22T13:13:12Z")

</div>

Hi,

I need to Base64 encode images taken from the camera in order to send via API.

I do not want the user to have to click on another action at any point to choose the image from the device’s camera roll (stored images).

I want to be able to get the Base64 encoding at the point the image is taken and store it in my local database to be sent later via API.

1. is this possible?
2. if yes does it require internet connectivity?

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [January 29, 2024, 8:02pm UTC](https://community.thunkable.com/t/encode-an-image-from-camera-to-base64/2796384/2 "2024-01-29T20:02:46Z")

</div>

Hi @lodgical.lodgeb, thanks for reaching out about this. Luckily, there are lots of great examples of this idea in other topics created by Thunkable community members. Check them out here:  
[https://community.thunkable.com/search?q=image%20base%2064%20order:latest](https://community.thunkable.com/search?q=image%20base%2064%20order:latest)

---

<div class="post-metadata">

**Author:** ![lodgical.lodgeb](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@lodgical.lodgeb](https://community.thunkable.com/u/lodgical.lodgeb)\
**Post date:** [January 31, 2024, 1:36am UTC](https://community.thunkable.com/t/encode-an-image-from-camera-to-base64/2796384/3 "2024-01-31T01:36:23Z")

</div>

I’m a bit concerned that from my research through historic forum posts and YouTube videos, it seems - and correct me if I am wrong - that:  
1: There used to be a Base64 Encode Block that was removed and never replaced (despite much complaint from the community)  
2: There was a “Media DB” Block - That from what I can see was replaced/changed to a block n the Camera Blocks  
3: A potential solution I saw used the process of creating a HTML file to encode to Base64 that you could enter into to a project’s assets. From what I can make out… this is no longer possible

I am more than a little concerned that I could create an App for my client in good faith and that it could at any point stop working due to the fact that the Thunkable Development Team decide to remove or change elements of functionality?

For example, I have literally sat through a YouTube tutorial and followed along with the steps and then been left in a position where I cannot continue because a block the presenter dragged on to the screen no longer exists ( in this case the Media DB block).

At this point, I am not sure I can continue with this product and I am rather disappointed to waste a lot of time.

But, like I say, please feel free to correct my comments

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [January 31, 2024, 4:07pm UTC](https://community.thunkable.com/t/encode-an-image-from-camera-to-base64/2796384/4 "2024-01-31T16:07:44Z")

</div>

Hi @lodgical.lodgeb, thanks for reaching out about this.

Showing the base64 from an image is still something you can do in the latest version of Thunkable.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/2/a2aba29ed117da27b50e038065dd59b3d1901afc.png)

I can respond to your other points as well, please let me know if you have any questions!

> [@lodgical.lodgeb](#):
>
> I am more than a little concerned that I could create an App for my client in good faith and that it could at any point stop working due to the fact that the Thunkable Development Team decide to remove or change elements of functionality?

All software evolves–this is true whether you are using Thunkable or coding a project in XCode. We always ensure that any updates to our platform will not cause any currently published apps to stop working. When we do change elements or functionality, we make a note of that usually in the Community via #Release Updates and in our [Docs](https://docs.thunkable.com/).

> [@lodgical.lodgeb](#):
>
> 1: There used to be a Base64 Encode Block that was removed and never replaced (despite much complaint from the community)  
> 2: There was a “Media DB” Block - That from what I can see was replaced/changed to a block n the Camera Blocks

Thunkable’s platform has evolved, as all software, does. Unfortunately, the videos you watched for this were likely older and used our older, Snap to Place interface. All of those blocks are still available if you create a Snap to Place project. To do that, simply uncheck the box for “Use the Drag and Drop builder” when creating a new project.  
 ![Screenshot 2024-01-31 at 11.03.36 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/8/587c29fba956856dd060fcf4080de41882f6d97f.png)

Thunkable now uses our improved Drag and Drop platform. Some blocks are different now but the functionality is all still there.

> [@lodgical.lodgeb](#):
>
> 3: A potential solution I saw used the process of creating a HTML file to encode to Base64 that you could enter into to a project’s assets. From what I can make out… this is no longer possible

This is still possible, please see Ioannis’ topic here:

> [@WEB API Firebase Storage It does not upload the file to the server](https://community.thunkable.com/t/web-api-firebase-storage-it-does-not-upload-the-file-to-the-server/2369895/4):
>
> Hello @whiterabbitstudio202 I’ve already created an app that uses the API Block to send an image file. I used Web Viewer and HTML code to convert the image file to base64 and then send it through the API. This is the code for HTML: \<!DOCTYPE html\> \<html\> \<body style="background-color:#18A2EB;"\> \<head\> \<meta charset="UTF-8" /\> \<meta name="viewport" content="width=device-width, initial-scale=1.0" /\> \<title\>Convert local file to Base64\</title\> \<script src="https://thunkab…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [April 30, 2024, 4:08pm UTC](https://community.thunkable.com/t/encode-an-image-from-camera-to-base64/2796384/5 "2024-04-30T16:08:09Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
