Skip to content
This repository was archived by the owner on Jun 5, 2022. It is now read-only.

Loading UploadIcon.svg with Data URI in CSS #22

Closed
wants to merge 1 commit into from

Conversation

joshuaai
Copy link
Contributor

@joshuaai joshuaai commented Mar 30, 2018

Converting the <svg> icon to it's Data URI format and using that url in
the CSS file instead. Webpack crashes in create-react-app when trying to parse
background: url(UploadIcon.svg) as it cannot find a suitable loader.

This fixes #21

Converting the <svg> icon to it's Data URI format and using that url in
CSS instead. Wbpack crashes in create-react-app when trying to parse
background: url(UploadImage.css) as it cannot find a suitable loader.
joshuaai added a commit to joshuaai/react-images-upload that referenced this pull request Mar 31, 2018
This keeps the original SVG file rather than inlining it as in JakeHartnell#23.
The image is passed instead as a the `src` property to <img />. This
fixes JakeHartnell#22.
@joshuaai joshuaai closed this Mar 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Module parse failed: Unexpected token (85:10)
1 participant