# How to save images in the background

**URL:** <https://community.thunkable.com/t/how-to-save-images-in-the-background/835665>\
**Category:** Questions about Thunkable X\
**Created:** [September 21, 2020, 9:18am UTC](https://community.thunkable.com/t/how-to-save-images-in-the-background/835665 "2020-09-21T09:18:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maria\_McParland](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maria_mcparland/32/30383_2.png) [@Maria\_McParland](https://community.thunkable.com/u/Maria_McParland)\
**Post date:** [September 21, 2020, 9:18am UTC](https://community.thunkable.com/t/how-to-save-images-in-the-background/835665/1 "2020-09-21T09:18:49Z")

</div>

Hi,

I’m making an app that takes image, adds labels and then saves them to be viewed later.  
We currently save the images in a stored list which works well but the app starts crashing after 8-9photos. We’ve also tried saving the images in databases etc.

We want to try using the cloudinary API to compress the images while saving. However this means saving images now takes an average of 30seconds which is too slow.

Just wondering if we can do the image save in the background, or does anyone have a better idea? 🙂

---

<div class="post-metadata">

**Author:** ![eddie.rebehy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eddie.rebehy/32/67993_2.png) [@eddie.rebehy](https://community.thunkable.com/u/eddie.rebehy)\
**Post date:** [September 21, 2020, 9:45am UTC](https://community.thunkable.com/t/how-to-save-images-in-the-background/835665/2 "2020-09-21T09:45:08Z")

</div>

Hi Maria,

I interpret from your post that you are storing the file in a database or Cloudinary and storing only the url in Thunkable variables. This is how I would do it also.

your typical Cloudinary URL looks like this:  
“[https://res.cloudinary.com/luco-cloudinary/image/upload/v1600387707/sample.jpg](https://res.cloudinary.com/luco-cloudinary/image/upload/v1600387707/sample.jpg)”

[![](https://res.cloudinary.com/luco-cloudinary/image/upload/v1600387707/sample.jpg) ](https://res.cloudinary.com/luco-cloudinary/image/upload/v1600387707/sample.jpg)

Replace the version number with a transition and just call the new url.

For example the above url could be  
“[https://res.cloudinary.com/luco-cloudinary/image/upload/w\_200/sample.jpg](https://res.cloudinary.com/luco-cloudinary/image/upload/w_200/sample.jpg)”

[![](https://res.cloudinary.com/luco-cloudinary/image/upload/w_200/sample.jpg) ](https://res.cloudinary.com/luco-cloudinary/image/upload/w_200/sample.jpg)

Thunkable allows relatively easy parsing of text so you should be able to play around with Cloudinary URL’s and do all sort of wonderful things and it is very quick.

Have a look at Cloudinary transitions by URL in their documentation.

---

<div class="post-metadata">

**Author:** ![eddie.rebehy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eddie.rebehy/32/67993_2.png) [@eddie.rebehy](https://community.thunkable.com/u/eddie.rebehy)\
**Post date:** [September 21, 2020, 9:53am UTC](https://community.thunkable.com/t/how-to-save-images-in-the-background/835665/3 "2020-09-21T09:53:52Z")

</div>

How large are your files?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [September 21, 2020, 4:21pm UTC](https://community.thunkable.com/t/how-to-save-images-in-the-background/835665/4 "2020-09-21T16:21:31Z")

</div>

The issue is the upload size. Not downloading. We need a way to be able to control client side photo quality.

---

<div class="post-metadata">

**Author:** ![Maria\_McParland](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maria_mcparland/32/30383_2.png) [@Maria\_McParland](https://community.thunkable.com/u/Maria_McParland)\
**Post date:** [September 21, 2020, 4:24pm UTC](https://community.thunkable.com/t/how-to-save-images-in-the-background/835665/5 "2020-09-21T16:24:01Z")

</div>

They are images taken using the camera component.

@jared, is there a way I can do this?  
We tried making the image smaller by setting height and width…which helped slightly but obviously not a great/long-term fix ☹

---

<div class="post-metadata">

**Author:** ![eddie.rebehy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eddie.rebehy/32/67993_2.png) [@eddie.rebehy](https://community.thunkable.com/u/eddie.rebehy)\
**Post date:** [September 21, 2020, 11:02pm UTC](https://community.thunkable.com/t/how-to-save-images-in-the-background/835665/6 "2020-09-21T23:02:28Z")

</div>

Sorry for the misunderstanding that @jared correctly pointed out.

I can’t see a way of controlling the resolution or hence the upload times but I have had no problem loading in the background using a dedicated screen and navigating away from it before calling the function in it. I hope this helps. I have made a simple app to demonstrate.

[https://x.thunkable.com/projectPage/5f69291b3f0990e9cbe2ab59](https://x.thunkable.com/projectPage/5f69291b3f0990e9cbe2ab59)

---

<div class="post-metadata">

**Author:** ![Maria\_McParland](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maria_mcparland/32/30383_2.png) [@Maria\_McParland](https://community.thunkable.com/u/Maria_McParland)\
**Post date:** [September 23, 2020, 8:40am UTC](https://community.thunkable.com/t/how-to-save-images-in-the-background/835665/7 "2020-09-23T08:40:08Z")

</div>

Thanks! This worked perfectly!

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [September 29, 2020, 3:29pm UTC](https://community.thunkable.com/t/how-to-save-images-in-the-background/835665/8 "2020-09-29T15:29:39Z")

</div>

Hey @eddie.rebehy, what is the counter for? Am I missing the purpose?

This is a cool idea! I like it a lot!!

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/7/870bc932868a807be88caf496bdd05c6e340308c.jpeg)

---

<div class="post-metadata">

**Author:** ![eddie.rebehy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eddie.rebehy/32/67993_2.png) [@eddie.rebehy](https://community.thunkable.com/u/eddie.rebehy)\
**Post date:** [September 29, 2020, 10:40pm UTC](https://community.thunkable.com/t/how-to-save-images-in-the-background/835665/9 "2020-09-29T22:40:43Z")

</div>

hi @jared,

the counter was just an arbitrary ‘do something’ demonstration to show foreground activity while background loads image on second screen.

---

<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, 12:23pm UTC](https://community.thunkable.com/t/how-to-save-images-in-the-background/835665/10 "2024-11-08T12:23:41Z")

</div>


