Dynamically populate list with images

I need to populate an image element within a list, so it would run in a loop.
The image name which I need to retrieve from the Files collection is passed from a different function.
I assume I have to do this when invoking JS after mapping the image name to the image element, but I'd appreciate help with that JS.

To simplify:
1) I receive a JSON object, one of the keys is image_name
2) I map that image_name to an image object on my app
3) I want to fetch that image (using the name) from the Files collection before mapping it, so that it will fetch the actual image.

If this isn't the way to do it - I'd appreciate a tip on how.

1 person has
this question