# Store and retrieve photos locally?

**URL:** <https://community.thunkable.com/t/store-and-retrieve-photos-locally/1317419>\
**Category:** Questions about Thunkable X\
**Tags:** camera\
**Created:** [May 31, 2021, 1:21am UTC](https://community.thunkable.com/t/store-and-retrieve-photos-locally/1317419 "2021-05-31T01:21:20Z")\
**Posts on this page:** 8\
**Page:** 1

<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:** [May 31, 2021, 1:21am UTC](https://community.thunkable.com/t/store-and-retrieve-photos-locally/1317419/1 "2021-05-31T01:21:20Z")

</div>

Since I discovered that Thunkable apps store photos on the device whenever photos (from camera or album) are added to an app using the Media DB to upload to Cloudinary, I realized that I want one of two things:

1. Photos stored in Cloudinary to save space on the device AND no photos stored on the device
2. Photos stored on the device AND retrievable later

Maybe these are pipe dreams but… can I store the green Photo block from the Camera block in a stored list variable and then retrieve it later? I suppose I could just try it… looking for a little advice if anyone has any.

---

<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:** [May 31, 2021, 1:22am UTC](https://community.thunkable.com/t/store-and-retrieve-photos-locally/1317419/2 "2021-05-31T01:22:36Z")

</div>

k… going to read this first:

> [@Is there a way to store Images in Objects?](https://community.thunkable.com/t/is-there-a-way-to-store-images-in-objects/551588):
>
> So I am trying to allow an Image to be saved as an object and then call that object on a different page and show the Image. With the blacks I have now, I am able to move unique Images as the jpg text but not as the visible Image. Do you guys have any ideas? Or maybe it just isn’t a featur yet but could be? [Annotation 2020-04-02 113856] It works in that I am able to move and store unique images but they appear like this Annotation 2020-04-02 113941|690x182](upl…

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [May 31, 2021, 1:26am UTC](https://community.thunkable.com/t/store-and-retrieve-photos-locally/1317419/3 "2021-05-31T01:26:09Z")

</div>

@tatiang , it’s possible to base64 encode an image. I wonder if that would allow you to store it. (You’d need js in a webviewer to do the encoding…) Hmm. I’m going to play with that, since we didn’t get a WDC. 😉

---

<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:** [May 31, 2021, 1:30am UTC](https://community.thunkable.com/t/store-and-retrieve-photos-locally/1317419/4 "2021-05-31T01:30:16Z")

</div>

Maybe yeah… and thanks for trying that!

I think the list of objects method may work but base64 might be a little less of a storage hog.

---

<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:** [May 31, 2021, 1:34am UTC](https://community.thunkable.com/t/store-and-retrieve-photos-locally/1317419/5 "2021-05-31T01:34:41Z")

</div>

This project appears to do that but it still requires Cloudinary which I’m trying to avoid:

> [@How to Convert Image to String](https://community.thunkable.com/t/how-to-convert-image-to-string/345190/2):
>
> Hello, Image to base64 [https://x.thunkable.com/projects/5dc2829fd8b6db40cf624dcd/project/properties/designer/](https://x.thunkable.com/projects/5dc2829fd8b6db40cf624dcd/project/properties/designer/) Best regards, Alex [ACtech demo project](https://x.thunkable.com/projects/5d70f93f8a62b4079eedaff2/project/properties/designer/)[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)[Bug tracker](https://x.thunkable.com/projects/5dbd5243a77acad1b26f851f/project/properties/designer/)

---

<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:** [May 31, 2021, 1:37am UTC](https://community.thunkable.com/t/store-and-retrieve-photos-locally/1317419/6 "2021-05-31T01:37:58Z")

</div>

Oh wait. I can’t do this with a Data Viewer List. It’s not going to take an image as an input. Darn.

---

<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:** [May 31, 2021, 1:47am UTC](https://community.thunkable.com/t/store-and-retrieve-photos-locally/1317419/7 "2021-05-31T01:47:11Z")

</div>

This seems crazy but all I did was store the green Photo block value in an app variable initialized as an object with the blank property “photo” and then when I save the value to the local DB, I just get the property “photo” of that variable. And it works! What?!?!?!

---

<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:22pm UTC](https://community.thunkable.com/t/store-and-retrieve-photos-locally/1317419/8 "2024-11-08T13:22:10Z")

</div>


