Use base64 encoded images

Thunkable X components can display images encoded in base64 format. To do this, enter the data in this format in the URL or file name input field, for example:


This allows you to use a string representation of the image instead of importing an image file into the project.

Some input fields on the Thunkable X properties panel do not work correctly with large text.



I recommend that you have to create your own YouTube channel and start making videos about your exp.
If you already have one, please drop the link here.

Thanks for the suggestion. Unfortunately, I do not know English well enough to create training videos and prefer to give information in text form. Therefore, while I post information here and on my Russian-language site.


It does not need a professional English language, you can show what are you doing with a few English label to describe what you did.

I understood. It’s like Thunkable tutorials. This is interesting and obvious for users, but there is one problem - if the interface of the software environment changes, then you will have to redo all tutorials. Otherwise, the old interface or blocks will be misleading.

You can ask, why should I encode images in base64 format, if I can add many files to the project at once? Because in some cases it’s more convenient to work with base64 - you can quickly update a huge amount of images in the project and get additional information about them (width, height, color depth, type, etc., that you want to add using the script).

Below is a php script that displays in the browser window text in base64 format for all graphics files in the specified (“sourceimages”) directory.

$list = array();

while ($File=readdir($Dir)):
	if (is_dir($File)==false)
			$path = $DirPath.$File;
			$data = file_get_contents($path);
			$fileInfo = getimagesize($path);
			$base64 = 'data:'.$fileInfo["mime"].';base64,' . base64_encode($data);
echo implode('#', $list);

After that, you can copy the base64 text into a text block “base54List” and turn it into a list for further work, as shown below.


1 Like