Why wont my images load in my React Vite project?

Public Folder>>
leaves.jpg

App.jsx:

function App() {
return (
<img src="./public/leaves.jpg" alt "img" />
)
}

The image is showing up on my image-preview extension which usually indicated the path is correct, I’m not sure what I’m doing wrong. It doesn’t return an error when I try to use this method. I also tried importing the image like: import leaves from './public/leaves.jpg' and plugging it in like: <img src={leaves} alt "img" />, but it was throwing an error that the file couldn’t be found.

Any help would be appreciated, thank you.