Encode an Image from Camera to Base64

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?

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

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

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.

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

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.

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

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

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