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

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:

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?

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.

2 Likes

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

1 Like