r/JavaScriptTips • • Jun 09 '22

Inserting images into an array

9 Upvotes

2 comments sorted by

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.

1

u/jafffers Jun 10 '22

Fixed it last night, it was that issue