I have a folder named Image inside my public folder that contains a jpg image file, however it's working in the browser. I've tried importing it using "import image ./public/Image/cats.jpg" and that hasn't worked either
import { Component } from 'react';
import './App.css';
class BasicFigure extends Component {
render() {
return (
<figure>
<img src="./public/Image/cats.jpg" alt="a cat" />
<figcaption>This is a picture of a cat</figcaption>
</figure>
);
}
}
export default BasicFigure;