# How to save an image in a (stored) variable?

**URL:** https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842
**Category:** Questions about Thunkable X
**Tags:** variables, image, stored-variable
**Created:** [April 2, 2021, 9:38pm UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842 "2021-04-02T21:38:38Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![pottergirlstechnovat](https://avatars.discourse-cdn.com/v4/letter/p/b19c9b/32.png) [@pottergirlstechnovat](https://community.thunkable.com/u/pottergirlstechnovat)
#### Post date: [April 2, 2021, 9:38pm UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842/1 "2021-04-02T21:38:38Z")

</div>

Hi,

We have a simple page to edit a “book” on which there is a button “Change Cover”. When clicked, we want to allow the user to select a photo on the phone and set the image’s picture to that photo.

Here are our blocks:

 ![our_blocks](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/e/2ee9e9bc3db2db42e9784c3c22afa02e48934f0d.png)

However, at the moment, it seems that our stored variable “cover\_image” does not properly saves the picture. When clicking back and then re-opening the page, the image’s picture is not properly loaded from the variable. Weirdly enough, it works when doing the exact same thing on the label’s text value, but we can’t make it work for an image.

Any idea on what is going wrong?

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [April 2, 2021, 10:12pm UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842/2 "2021-04-02T22:12:53Z")

</div>

You need to store the image outside of Thunkable. This is usually done with Cloudinary. So you upload/host the image on Cloudinary and then access the url in Thunkable to display the image. The green “Photo” block should have the url so all you need to do is set your stored variable to that value.

---

<div class="post-metadata">

### Author: ![pottergirlstechnovat](https://avatars.discourse-cdn.com/v4/letter/p/b19c9b/32.png) [@pottergirlstechnovat](https://community.thunkable.com/u/pottergirlstechnovat)
#### Post date: [April 14, 2021, 10:44pm UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842/3 "2021-04-14T22:44:12Z")

</div>

Right, putting the variable-set inside the “then do” block and using “photo” rather than “Cover\_image’s picture” worked. Thanks!

---

<div class="post-metadata">

### Author: ![alex\_ezacae](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@alex\_ezacae](https://community.thunkable.com/u/alex_ezacae)
#### Post date: [November 23, 2021, 1:35pm UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842/4 "2021-11-23T13:35:50Z")

</div>

hello,

We cannot save the photo directly in the stored variable ? I do not want to use the cloud. I imagine that we can encode the image but I thougth we could use the stored variable and the media library.  
Any tips on this ?

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [November 23, 2021, 7:17pm UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842/5 "2021-11-23T19:17:31Z")

</div>

There’s a new base64 converter block in the Camera & Media drawer. I haven’t used it but I think you could convert and store the value in a variable.

---

<div class="post-metadata">

### Author: ![alex\_ezacae](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@alex\_ezacae](https://community.thunkable.com/u/alex_ezacae)
#### Post date: [November 25, 2021, 9:33am UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842/6 "2021-11-25T09:33:03Z")

</div>

thanks I did not see it.  
I will try now and let you know

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [November 25, 2021, 9:50am UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842/7 "2021-11-25T09:50:06Z")

</div>

See the red arrow

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/4/14e63787d092ab4b3b435d057e8ac12c81bd586b.png)

---

<div class="post-metadata">

### Author: ![alex\_ezacae](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@alex\_ezacae](https://community.thunkable.com/u/alex_ezacae)
#### Post date: [November 25, 2021, 10:01am UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842/8 "2021-11-25T10:01:59Z")

</div>

I do not have the block.  
Maybe it is not officially released yet ?

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [November 25, 2021, 10:05am UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842/9 "2021-11-25T10:05:28Z")

</div>

> [@alex\_ezacae](#):
>
> I do not have the block

This block is only available in the DnD UI. It is not available in the StP (old or legacy) UI.

---

<div class="post-metadata">

### Author: ![alex\_ezacae](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@alex\_ezacae](https://community.thunkable.com/u/alex_ezacae)
#### Post date: [November 25, 2021, 10:10am UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842/10 "2021-11-25T10:10:12Z")

</div>

![Capture d’écran 2021-11-25 à 11.09.09](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/d/2dae91888d6b6c2c4b812789cd435d6ec7e463ca.png)

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 20, 2021, 10:18pm UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842/11 "2021-12-20T22:18:56Z")

</div>

This block is not part of my drag and drop Camera & Media drawer.

---

<div class="post-metadata">

### Author: ![bnice](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bnice/32/110648_2.png) [@bnice](https://community.thunkable.com/u/bnice)
#### Post date: [December 20, 2021, 11:37pm UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842/12 "2021-12-20T23:37:38Z")

</div>

I do not have this either.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [December 21, 2021, 7:14am UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842/13 "2021-12-21T07:14:08Z")

</div>

Yes, @tatiang, the block was removed from the drawer. Not just that, Thunkable removed the announcement of this block from the `Release Notes` in their documentation.

**[Edit]**  
I just tested a code that I have using this block in an old project  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/7/971d4d25277a37d6f87ef7372338a3787115d314.png)

The code does not work anymore.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 21, 2021, 7:30am UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842/14 "2021-12-21T07:30:14Z")

</div>

Thanks for the clarification. I was wondering about that.

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 1:25pm UTC](https://community.thunkable.com/t/how-to-save-an-image-in-a-stored-variable/1202842/15 "2024-11-08T13:25:31Z")

</div>


