# Set background picture error

**URL:** <https://community.thunkable.com/t/set-background-picture-error/63412>\
**Category:** Questions about Thunkable X\
**Tags:** design\
**Created:** [January 5, 2019, 10:15pm UTC](https://community.thunkable.com/t/set-background-picture-error/63412 "2019-01-05T22:15:03Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![rojored12](https://avatars.discourse-cdn.com/v4/letter/r/47e85d/32.png) [@rojored12](https://community.thunkable.com/u/rojored12)\
**Post date:** [January 5, 2019, 10:15pm UTC](https://community.thunkable.com/t/set-background-picture-error/63412/1 "2019-01-05T22:15:03Z")

</div>

Hey, anyone having troubles setting background picture for buttons? Without any specific pattern or cause, the picture I set gets removed from the block.  
I have already recreated multiple times the same blocks, uploaded new images with other names and even deleted and recreate again the buttons. Nothing appears to work

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/a/da0c195d9430d6f5422bb4c204d1a329d567243e.png)

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [January 5, 2019, 11:14pm UTC](https://community.thunkable.com/t/set-background-picture-error/63412/2 "2019-01-05T23:14:08Z")

</div>

Hi @rojored12,

I would advise using a variable to store the name/path of your image and then using the value of that variable to set your background image.

This will make your blocks more resilient to future changes.

---

<div class="post-metadata">

**Author:** ![rojored12](https://avatars.discourse-cdn.com/v4/letter/r/47e85d/32.png) [@rojored12](https://community.thunkable.com/u/rojored12)\
**Post date:** [January 5, 2019, 11:49pm UTC](https://community.thunkable.com/t/set-background-picture-error/63412/3 "2019-01-05T23:49:56Z")

</div>

Thanks! For now it´s working smoothly. Any changes I´ll let you know.

---

<div class="post-metadata">

**Author:** ![rojored12](https://avatars.discourse-cdn.com/v4/letter/r/47e85d/32.png) [@rojored12](https://community.thunkable.com/u/rojored12)\
**Post date:** [January 14, 2019, 11:52pm UTC](https://community.thunkable.com/t/set-background-picture-error/63412/4 "2019-01-14T23:52:05Z")

</div>

Hey there again, I’ve just made my first test with the .APK file on Android and it seems that none of the pictures I have as variables, don’t show up; whereas the rest of the pictures set directly as pictures do. Any problems like this before?

---

<div class="post-metadata">

**Author:** ![Cian\_O\_Sullivan](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/cian_o_sullivan/32/34494_2.png) [@Cian\_O\_Sullivan](https://community.thunkable.com/u/Cian_O_Sullivan)\
**Post date:** [January 15, 2019, 1:07am UTC](https://community.thunkable.com/t/set-background-picture-error/63412/5 "2019-01-15T01:07:23Z")

</div>

Are they properly set to the local path?

Can you paste a few block examples of how you set your image variables please.

---

<div class="post-metadata">

**Author:** ![rojored12](https://avatars.discourse-cdn.com/v4/letter/r/47e85d/32.png) [@rojored12](https://community.thunkable.com/u/rojored12)\
**Post date:** [January 15, 2019, 1:21am UTC](https://community.thunkable.com/t/set-background-picture-error/63412/6 "2019-01-15T01:21:08Z")

</div>

Actually I just set the variable as e.g. “image.png”, which works fine with the thunkable live app. I don’t think I know how to set the local path correctly.

---

<div class="post-metadata">

**Author:** ![Cian\_O\_Sullivan](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/cian_o_sullivan/32/34494_2.png) [@Cian\_O\_Sullivan](https://community.thunkable.com/u/Cian_O_Sullivan)\
**Post date:** [January 15, 2019, 1:49am UTC](https://community.thunkable.com/t/set-background-picture-error/63412/7 "2019-01-15T01:49:02Z")

</div>

I had no issues. I uploaded two pngs, and then created these blocks. I downloaded and tried the APK and it works fine. I need more info on the blocks causing an issue.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/4/646d9be48f3851efff2a8268934bd809a070a252.png)

---

<div class="post-metadata">

**Author:** ![rojored12](https://avatars.discourse-cdn.com/v4/letter/r/47e85d/32.png) [@rojored12](https://community.thunkable.com/u/rojored12)\
**Post date:** [January 15, 2019, 2:21am UTC](https://community.thunkable.com/t/set-background-picture-error/63412/8 "2019-01-15T02:21:54Z")

</div>

I´m sorry, I didn´t have my computer earlier that´s why I couldn´t show you my blocks.

At the left is the function in which all the images are set into variables; at right, 2 situations in which those variables are used.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/5/757b79ac3feb6f7d858bd068fbdd4d6cd4d00da2.png)

As I mentioned before, all the images that are directly set to buttons backgrounds, same as you did in your previous example, work fine.

---

<div class="post-metadata">

**Author:** ![Cian\_O\_Sullivan](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/cian_o_sullivan/32/34494_2.png) [@Cian\_O\_Sullivan](https://community.thunkable.com/u/Cian_O_Sullivan)\
**Post date:** [January 15, 2019, 2:53am UTC](https://community.thunkable.com/t/set-background-picture-error/63412/9 "2019-01-15T02:53:51Z")

</div>

Add a label, and set the text of the label to the variables, as a test. I am confused why you are using join commands for your variable names. I have not seen that before, and do not think it is a good idea. I dont know if that is the cause or not.

For now set up a label to pass the variables you expect to. Then go from there.

---

<div class="post-metadata">

**Author:** ![rojored12](https://avatars.discourse-cdn.com/v4/letter/r/47e85d/32.png) [@rojored12](https://community.thunkable.com/u/rojored12)\
**Post date:** [January 15, 2019, 3:54am UTC](https://community.thunkable.com/t/set-background-picture-error/63412/10 "2019-01-15T03:54:04Z")

</div>

The label testing did show the “text.png”, though it flickered in both the thunkable live and apk; and also both either with variables joining text and variables that don´t. However, the variable I tested with the label, did show successfully its respective image. The latter didn´t happen with the untested variables-label. Nevertheless, in the thunkable live, I´m still don´t having any issue showing the images of all variables properly.

Regarding why I use variables with joining text is because I have to store many lists when the user opens the list for the first time, and so on, without replacing the previously opened lists; and then retrieve the same local file when the user opens that list again; so I figured out that with that technique I could store under the same general stored variable e.g. “local\_list” and then just add (join), an identifier for that specific list e.g. “\_red” which is also a variable e.g. “selectedcolor”. All of these instead of initializing one variable for every single list thta I could possibly generate with my data (more than 35 lists) everytime the screen opens. I hope that I explained myself correctly and also that I didn´t screwed it hahaha. Btw If you happen to know a better way to do what I want to, I´m open to better ideas 😉

---

<div class="post-metadata">

**Author:** ![rojored12](https://avatars.discourse-cdn.com/v4/letter/r/47e85d/32.png) [@rojored12](https://community.thunkable.com/u/rojored12)\
**Post date:** [January 15, 2019, 3:59am UTC](https://community.thunkable.com/t/set-background-picture-error/63412/11 "2019-01-15T03:59:03Z")

</div>

PS: before using variables for my images, I was using list items, however they were really unstable when I used “If blocks” to set the image for a specific component as you can see in the first post of this thread

---

<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:16pm UTC](https://community.thunkable.com/t/set-background-picture-error/63412/12 "2024-11-08T12:16:27Z")

</div>


