I've been attempting to insert an image using the <img> tag
on CodeSandbox.io
. However, each time I try to do so, it fails to display and defaults to the alt
tag (Shows Mountain).
The goal is to load an image from the same folder as the file that contains this JS file.
Here is the code responsible for generating the HTML:
function Navbar() {
return (
<navbar className="navbar">
<div>
<img src="business-landing-page-template-with-photo_52683-19539.jpg" alt="Mountain"/>
</div>
</navbar>
)
If anyone could guide me on how to successfully load the image, that would be greatly appreciated.