1import React from 'react';
2import logo from './logo.png'; // Tell webpack this JS file uses this image
3
4console.log(logo); // /logo.84287d09.png
5
6function Header() {
7 // Import result is the URL of your image
8 return <img src={logo} alt="Logo" />;
9}
10
11export default Header;
1<img src={process.env.PUBLIC_URL + "/images/dog.png"}
2// process.env.PUBLIC_URL is the key here