I would like to load images dynamically from an images folder. Names in the folder like {company_name}.png. The names are stored in a json file along with other company data like name, type, etc.
e.g.: name: meta logo: "./images/meta.png" Is there any way to dynamically load these images like require(changing variable based on the json logo string).
I found some solution online like: https://stackoverflow.com/a/52598171/7990652
But all the other things are build around the json structure to load all the other data. Is there any way to load everything from a folder one by one based on the provided logo link in the json?
I also tried to look around for a solution with babilon require all plugin, but I found nothing about that.
P.S. I know there are sevaral threads about this question, but in almost all the threads someone asking "what about if I want to load 100-1000 images?". That is the case with me too, I would like to load a lot of images, not just up to 10-20 which is complately okay with static .js require list.
require? Can't you usefetch, or a plain oldimgtag and dynamically set thesrcattribute?