My problem is that react doesn't show any image (jpeg, png) or svg file. I've been trying some different techniques such as a simple import inside src attribute of an image, or using require(). But I couldn't solve the problem, I also tried to move the image between the different folders and that also doesn't work.
I´m using react and styled-components, here is some of my code:
<Img src={require('../../images/cuervo.png')} alt={alt}></Img>
Creating a new compponent:
import React from 'react'
import { Icon } from '@material-ui/core'
const mainLogo = require("./logo.svg")
const Logo = () => {
return (
<Icon>
<img src={ mainLogo } height={25} width = {25}>
</img>
</Icon>
)
}
export default Logo
Import does not work, either.