I used image in my project imported in .css file and I changed it to have it in code. Unfortunately the style doesn't work the same way. Is there any easy way how to fix them?
<div class="image" />
.image {
background: url('./../images/example.jpg') no-repeat;
background-size: 100%;
height: 530px;
}
to
<div>
<img class="image"
src={`${process.env.PUBLIC_URL}/assets/images/example.jpg`}
alt="Example"/>
</div>
.image {
background-size: 100%;
height: 530px;
}