r/JavaScriptTips • u/jafffers • Jun 09 '22
Inserting images into an array
Each person has photo required, everything is outputting but I just cant get the photo in there I feel like I am on the cusp but I am missing something,
I am keeping everything in the javascript file
9
Upvotes
1
u/La_Jhin Jun 10 '22
In your loop you are appending the photo path itself as a child of the img tag. It should be the src attribute.
Also the photo paths have spaces that might cause some issues as well.