Here's my folder layout
src (folder)
images (folder)
alligators (folder)
Alligator 1.svg (svg file)
main.js (javascript file)
And here's my line of code in main.js file:
<img src={require("./images/alligators/Alligator 1.svg")} alt="alligator illustrator" />
I am getting no errors, I'm just getting my alt-text displayed and my image not being shown.
What seems to be my problem with my path?
I also just tried {} curly without "require", but the result is the same. I tried renaming Alligator 1 without a space, but again, the result is the same.
If my code is correct, what other possible reasons could this be happening?