Show an image based on an integer

Hey everybody! I have an entity with many integer attributes that get the value of a random number between one and eight. After they got their value I want to display an image based on the number. Is there any way to do this?   Best regards
1 answers

I could think of one way to do this. Create an entity to store images in database. Use the system.image to inherit from. 
Now when your integer attributes gets the number, at that time invoke a microflow to store the image based on that number in your image entity.
To display this image, use the dynamic image widget. This means whenever the integer attribute changes, image stored in the entity would be updated and the new image will be displayed on the page. When updating image object, use refresh in client activity to refresh the page so that it displays new image

You can also implement it for displaying multiple images based on multiple integer attributes. Just update the image entity objects accordingly and they will be reflected on the page