ERROR calling Images from public folder
See original GitHub issueI want to know how to acess the public folder inside react to use images from map.
Check out the project structure:
I have pass the values from src to public, it’s now inside public folder
This is my process to get URL to concat URL file:
<img src={"./category_images/".concat(categorie.file_path)} alt="" class="img-responsive" />
I’m getting Failed to load resource: the server responded with a status of 404 (Not Found)
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
React import images from public folder - Stack Overflow
The import using file-loader works, but I need to access the source directly from the public path like <img src='/static/images/image.png'></img> ...
Read more >4.1.0.14 - Adding Images - LearnHowToProgram.com
In this lesson, we'll cover adding static assets such as images to a React application that uses create-react-app . You aren't required to...
Read more >HTML and Static Assets - Vue CLI
Any static assets placed in the public folder will simply be copied and not go through webpack. You need to reference them using...
Read more >Using the Public Folder - Create React App
The public folder contains the HTML file so you can tweak it, for example, to set the page title. The <script> tag with...
Read more >Images - React Native
Images live in the same folder as your JavaScript code. ... Sometimes, you might be getting encoded image data from a REST API...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please follow the issue template then and provide us with a reproducable demo so we can look at what you’re doing wrong; thanks!
You should find this guide sufficient. If not, let us know and we can re-open this.