I need to help. My problem is broken img.I work on React. How can I solve ?
Seems like the path to image is broken, try to solve it
by import image in the head of the file and add image path to your <img> element
import React, { Component } from 'react';
import logo from './logo.png'; // <-- import image here
class test extends Component {
render() {
return (
<>
<img src={logo} /> // <-- add image path here
</>
);
}
}
export default test;
docs for adding images to your react app https://create-react-app.dev/docs/adding-images-fonts-and-files/
you must import that image and set width and height for that image
import image1 from "./1.jpg";