-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
🐛 bug report
Description of the problem
In create-react-app I would like to be able to import SVG image paths using the syntax below:
import img from './img.svg'This works in a normal create-react-app application.
In CodeSandbox it results in a broken image:
Alternatives I've Tried
I know that there is the ReactComponent named export from SVGs, which is great!
import { ReactComponent } from "./resources/calendar.svg";But sometimes I want to import the paths to the SVGs instead.
How has this issue affected you? What are you trying to accomplish?
I would like to use SVGs with the paths instead of the ReactComponent.
Importing images from
Link to sandbox: link (optional)
Your Environment
| Software | Name/Version |
|---|---|
| Сodesandbox | |
| Browser | |
| Operating System |
jackyef, irrisor, rifat-dhrubo, ryjohnson, jakemhiller and 1 more
Metadata
Metadata
Assignees
Labels
No labels
