Design comparison
Solution retrospective
Hi, i initially uploaded the solution onto github with my image extension in lowercase but the images did not appear on the live site. Therefore, i've made amendments to uppercase after googling and it worked. But now it doesn't seem to work again. Not too sure why. It's working perfectly fine locally on my machine.
Community feedback
- @darryncodesPosted about 3 years ago
Hi Eric,
This brief overview of how how file paths work should help. Your index.html is looking for images in the same directory. Try
<img src="images/illustration-hero.SVG" alt="" class="img" />
All the best!
0@erictan86Posted about 3 years ago@darryncodes just changed to "images/filename.SVG" but doesn't work either. I don't think "./images/filename.SVG" can't work?
0@darryncodesPosted about 3 years agoit's definitely lower case @erictan86
<img src="images/illustration-hero.svg" alt="" class="img" />
0@erictan86Posted about 3 years ago@darryncodes had set up as lowercase initially but image didn't appear. Changed it to SVG and the image appear temporarily but now it's not again. frustrating.
0@darryncodesPosted about 3 years agohave you tried it with the correct file path too @erictan86? I feel your pain, however if you learn things the hard way you'll never forget them!
0@erictan86Posted about 3 years ago@darryncodes just try reloading and seem to work now. "./images/filename.svg" - any idea why this can't work? i've learned that ./ represents the relative path and it's encouraged to write the relative path. Thanks anyway.
0@darryncodesPosted about 3 years agoexcellent news @erictan86, your design looks great!
You are using the relative path. Also it can work but you'd need to put all your images in the root directory, instead of in an images folder.
Relative paths make use of a dot (.) and a double-dot (..), which translate into the current directory and the parent directory. Double dots are used for moving up in the hierarchy. A single dot represents the current directory itself.
Marked as helpful0@erictan86Posted about 3 years ago@darryncodes thanks very much. let me try them in the next project.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord