question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to use <img />?

See original GitHub issue

i tried using it like this

<img src="./xxx.png">

but it could not load image also, when i build my project(production). I got this error

ERROR in ./~/css-loader?localIdentName=[hash:base64]&modules&importLoaders=1!./~/postcss-loader!./client/modules/About/components/AboutJumbotron/AboutJumbotron.css
    Module not found: Error: Can't resolve 'about.png' 

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
somuscommented, Jul 8, 2016

You have require or import the image, not just give the path. Then only, webpack will import the required file. Examples for importing in react component and css file.

Let me know if it helps.

1reaction
ozkeycommented, Jul 5, 2016

In regards to PNG not rendering on header I fixed it by changing the line below in “webpack.config.dev.js” publicPath: 'http://127.0.0.1:8000/',

I hope this helps

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML Images - W3Schools
The HTML <img> tag is used to embed an image in a web page. Images are not technically inserted into a web page;...
Read more >
Images in HTML - Learn web development | MDN
In order to put a simple image on a web page, we use the <img> element. This is a void element (meaning, it...
Read more >
How to Insert an Image in HTML Page? - Tutorialspoint
We can insert images into the HTML page. To insert image in an HTML page, use the <img> tags. It is an empty...
Read more >
How to Insert an Image in a Webpage (HTML / XHTML)
Comments • 849 ; How to Insert Images in HTML | An HTML5 Image Tutorial. Dave Gray · 13K views ; How to...
Read more >
Quick Tutorial - How to Use Images in HTML - img src - YouTube
Quick Tutorial - How to Use Images in HTML - img src. Watch later. Share. Copy link. Info. Shopping. Tap to unmute.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found