Can't display images

I am trying to display the images

I have tried uploading them as assets and displaying them

Code Sample:

def image_1_show(self, **event_args):
    """This method is called when the Image is shown on the screen"""
    self.image_1.source="orignal_network.png"
    
    

  def image_2_show(self, **event_args):
    """This method is called when the Image is shown on the screen"""
    self.image_2.source="seed_network.png"
    

  def image_3_show(self, **event_args):
    """This method is called when the Image is shown on the screen"""
    self.image_3.source="infected_network.png" 

Clone link:
c-s-d-m.anvil.app

If your images are uploaded as assets, you need to tell Anvil where to find them:

self.image_1.source="_/theme/orignal_network.png"

_/theme/ is the root directory of the uploaded assets.

1 Like