Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing images? #138

Closed
arjandha opened this issue May 12, 2016 · 1 comment
Closed

Importing images? #138

arjandha opened this issue May 12, 2016 · 1 comment

Comments

@arjandha
Copy link

This may be a simple question but the npm run build command does not seem to grab the images I've added into a new directory called src/images. As a result, a broken image link is displayed.

I see in the webpack configs a loader for .jpegs, .pngs, and .gifs.

I assume that the react way is to add these in a component via an import image from '[location name here]' invocation at the top of the component, but that doesn't seem to work either...

@kwelch
Copy link
Collaborator

kwelch commented May 13, 2016

Why did you close? How did you handle it? I wrote a new section into my buildHtml.js that does the copy from src to dist. Did the import work? If so I may make the same adjustments, it sounds cleaner.

Update

I saw the other issue that references how to do this, with the update to the FAQ. Apparently I read my notifications out of order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants