Images uploaded used in a script won't load

Hello,

I’m a beginner in coding and I try to load images inside a For loop within a script. I uploaded all the images on glitch, but I always get the error code 404.

Could you please help me ?

Thank you in advance

By the way, if you have an idea to avoid creating the flags array manually, I would be very grateful (that’s the reason why I’m only testing on the first item of the array now)

I have a countries.json file with the data per country

At the end I would like to create a series of pictures (the flags) and when you move with your mouse on one flag you get the name and other data on the country

Thank you for replying, but what should I do then ?

I need to mention that I have another project and images loaded with css as background are loading well