I'm trying to display one image based on an if/else statement related to "price". I have 5 folders in my /assets/images directory as follows:
very_bad
bad
ok
good
very_good
Each folder contains multiple images and I would like to grab only one image from the appropriate folder at random, so the user doesn't always have to see the same image.
For example, if the price is less than -2%, I would want to randomly display an image from the "very_bad" folder. If the price is greater than 2%, I would want to randomly display an image from the "very_good" folder.
How would you tackle this issue? Thanks for the help!