Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJames Fleming
Full Stack JavaScript Techdegree Graduate 15,848 PointsWanted to see if this is only me accessing my images like this..
In the video, he mentioned that we can access the images in the public folder by referencing /static to start the file path, then continuing into the folder. So like this: /static/img/close.svg. When I do it like that, i receive an error and the image doesn't show. However, if I remove the /static part and just type the following: /img/close.svg it fixes the problem and adds the image to the browser. Did anyone else experience this? Is this wrong? Thank you!!
1 Answer
Jelena Feliciano
Full Stack JavaScript Techdegree Student 12,729 PointsYou might be receiving that error message because the img file may not have been saved in the public file. I made the same mistake and was going to do what you decided until the lightbulb went off after watching the video for the millionth time. As with anything in coding, there are many ways to accomplish one task, so if it works, I'd say go with it.