You don’t need any webpack configuration for this..
In your component just give image path. By default react will know its in public directory.
<img src="https://stackoverflow.com/image.jpg" alt="image" />
More Related Contents:
- How to avoid bind or inline arrow functions inside render method
- Make React useEffect hook not run on initial render
- React ‘cannot read property of undefined’ when using map
- Rendering raw html with reactjs
- How to pass data from a page to another page using react router
- How to call loading function with React useEffect only once
- How to use componentWillMount() in React Hooks?
- Correct way to handle conditional styling in React
- Is it possible to share states between components using the useState() hook in React?
- Why is immutability so important (or needed) in JavaScript?
- Multiple path names for a same component in React Router
- How do you send images to node js with Axios?
- react.js Replace img src onerror
- React | How to detect Page Refresh (F5)
- Do I have to store tokens in cookies or localstorage or session?
- How to handle calling functions on data that may be undefined?
- First Load JS shared by all is rather heavy in next.js
- Why is React not rendering my component state correctly?
- I can’t reference an image in Next.js
- Update one of the objects in array, in an immutable way
- What does useCallback/useMemo do in React?
- Is there a way to render multiple React components in the React.render() function?
- How to create a protected route with react-router-dom?
- How to hide bottom navigation bar on a specific screen in react native?
- Do we still need functional setState way in react hooks?
- React 18 strict mode causing component to render twice [duplicate]
- Reactjs-setState previous state is the first argument, props as the second argument
- Browser Detection in ReactJS
- Exporting functions with reactjs and babel
- Enzyme simulate an onChange event