Change image with switch

I created an app with the on / off switch (Switch3)
I would like to go further in my creation, ie when the light is "ON" a lit bulb is displayed and when it is "OFF" a light bulb is displayed.

Capture d’écran 2020-08-15 à 11.35.40

Look what i did

1 Like

Hello sg72

It is much easier and more reliable/safer to have the images stored in your App's Media.


Hello Chris
Thank you for your help
The image no change

What does that mean and what should we see it here?
So what's the problem?

the image does not change depending on the switch

Where are you using a Web.GotText or Web.GotFile to capture your image? You need one of those Blocks.

See figure 24-7 here > Communicating with the Web Web Get Blocks only works if you use it with the Got Block.

I found the solution

1 Like

You must indicate if you want the image to change directly when you change the Switch (see the @ChrisWard example) or when it receives the response.

Yes i want the image to change directly when I change the Switch