Can't find a reason why this image won't load on react

Viewed 46

So there is a folder named "images" in Public.

The funny thing is it was working fine until I uploaded it on github pages, and then when I refreshed, it just broke. The images don't load either on the github pages or on local anymore.

<img src= "images/equilibrium.jpg" alt="equilibrium background" />
1 Answers

Just add / at the beginning of source url.

<img src="/images/equilibrium.jpg" alt="equilibrium background" />

Related