# \[Solved\] Photos in Stored Variable Removed

**URL:** https://community.thunkable.com/t/solved-photos-in-stored-variable-removed/339906
**Category:** Questions about Thunkable X
**Tags:** solved, photolibrary, local-variables
**Created:** [November 27, 2019, 4:27am UTC](https://community.thunkable.com/t/solved-photos-in-stored-variable-removed/339906 "2019-11-27T04:27:43Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![maptheunknown](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@maptheunknown](https://community.thunkable.com/u/maptheunknown)
#### Post date: [November 27, 2019, 4:27am UTC](https://community.thunkable.com/t/solved-photos-in-stored-variable-removed/339906/1 "2019-11-27T04:27:43Z")

</div>

Hello,

User uploads photos and it gets stored in the stored variable. When the user installs a new version of the app, the stored variables are maintained but the photos are all missing for the user. Is there a solution to maintain user uploaded photos in the stored variables even if user re-installs a new version of the app without uploading the user’s photos to the cloud? Most of my use cases are offline so I’m looking for a way to keep the photos without uploading to Cloudinary.

Thanks!

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [November 27, 2019, 10:04am UTC](https://community.thunkable.com/t/solved-photos-in-stored-variable-removed/339906/2 "2019-11-27T10:04:35Z")

</div>

What do your words mean when you say that a user uploads photos? How and where are these photos downloaded and where are they stored? You can save paths to photos, but you need to use additional functionality to get the contents of the files. So the question is, do you keep links to photos or their contents?

Are you sure that when you install a new version of the application, the data in the stored variables is saved?

---

<div class="post-metadata">

### Author: ![maptheunknown](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@maptheunknown](https://community.thunkable.com/u/maptheunknown)
#### Post date: [November 27, 2019, 11:03am UTC](https://community.thunkable.com/t/solved-photos-in-stored-variable-removed/339906/3 "2019-11-27T11:03:17Z")

</div>

Hello @actech,

The user can upload the photo from his/her mobile phone using the Camera or PhotoLibrary component which then gets stored in a stored variable. The data in the stored variable gets is maintained when a new version of the app is installed including the path of the photo but the photo doesn’t exist anymore in that path.

Are there other ways to store photos locally that won’t be deleted when a new version gets installed?

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [November 27, 2019, 1:22pm UTC](https://community.thunkable.com/t/solved-photos-in-stored-variable-removed/339906/4 "2019-11-27T13:22:01Z")

</div>

Of course, photos will not be on the specified path, because this is a temporary path. There is no simple solution to your problem, but this option is possible: you upload a photo from the Camera or Gallery, then send it to Cloudinary, and then send the link received from Cloudinary to Web Api, which returns the contents of the file in base64 format. You can save this data in the storevd variable.

If you are satisfied with this method, I can tell you more.

---

<div class="post-metadata">

### Author: ![maptheunknown](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@maptheunknown](https://community.thunkable.com/u/maptheunknown)
#### Post date: [November 28, 2019, 8:01am UTC](https://community.thunkable.com/t/solved-photos-in-stored-variable-removed/339906/5 "2019-11-28T08:01:00Z")

</div>

Gotcha. I’m looking at base64 API converters. Looks like that’s my best option right now. I would need to convert the image to a smaller PNG first (so it won’t impact performance of the app) then convert it to Base64. Do you have a recommended Base64 API converter and some samples?

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [November 28, 2019, 8:45am UTC](https://community.thunkable.com/t/solved-photos-in-stored-variable-removed/339906/6 "2019-11-28T08:45:57Z")

</div>

Check it

[https://x.thunkable.com/projects/5dc2829fd8b6db40cf624dcd/project/properties/designer/](https://x.thunkable.com/projects/5dc2829fd8b6db40cf624dcd/project/properties/designer/)

Best regards, Alex  
[Thunkable X Basic Programming Course](http://droidscript.ru/main/title_ds15.php)  
[Block Reference](http://droidscript.ru/main/statyi/thunkableios_blockhelper.php)  
[Component Reference](http://droidscript.ru/main/statyi/thunkableios_objects.php)

---

<div class="post-metadata">

### Author: ![maptheunknown](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@maptheunknown](https://community.thunkable.com/u/maptheunknown)
#### Post date: [November 28, 2019, 2:37pm UTC](https://community.thunkable.com/t/solved-photos-in-stored-variable-removed/339906/7 "2019-11-28T14:37:05Z")

</div>

I’ll check this out! thanks so much!

---

<div class="post-metadata">

### Author: ![maptheunknown](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@maptheunknown](https://community.thunkable.com/u/maptheunknown)
#### Post date: [December 3, 2019, 12:20pm UTC](https://community.thunkable.com/t/solved-photos-in-stored-variable-removed/339906/8 "2019-12-03T12:20:00Z")

</div>

it worked!! thanks for all the help @actech. You are awesome!!

---

<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, 11:46am UTC](https://community.thunkable.com/t/solved-photos-in-stored-variable-removed/339906/10 "2024-11-08T11:46:29Z")

</div>


