I can't view the photos in my project that I created with create react app. please help me..
<img id="2" src={require('../../../img/logo.png')} className="img-fluid" alt="logo"/>
the file path is absolutely correct.
package.json:
{
"name": "e-ticaret-react-ui",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.15.0",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"axios": "^0.24.0",
"bootstrap": "^5.1.3",
"jquery": "^3.6.0",
"react": "^17.0.2",
"react-bootstrap-icons": "^1.6.1",
"react-dom": "^17.0.2",
"react-redux": "^7.2.6",
"react-router-dom": "^5.3.0",
"react-scripts": "4.0.3",
"redux": "^4.1.2",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
A photo was displayed in the React project created by Visual Studio. Photos are not displayed in the project I created with create react app in vs code. The file structure is exactly the same. the folder paths are correct.