Reputation: 732
I am using semantic-ui-react and I have some problems rendering a simple image. After importing image:
import { Button, Image, Header, Card } from 'semantic-ui-react';
This is not working
<Image floated='right' size='mini' src={require('./icons/logo.svg')}/>
And neither this:
import logo from './icons/logo.svg'
...
<Image floated='right' size='mini' src={logo}/>
Upvotes: 2
Views: 1462
Reputation: 2408
Ricardo, that error is telling you that in your Webpack config you do not have a loader configured to handle SVG files. This is probably the one you want to use: svg-loader
Upvotes: 1