@darryncodes
Posted
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!
@erictan86
Posted
@darryncodes just changed to "images/filename.SVG" but doesn't work either. I don't think "./images/filename.SVG" can't work?
@darryncodes
Posted
it's definitely lower case @erictan86
<img src="images/illustration-hero.svg" alt="" class="img" />
@erictan86
Posted
@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.
@darryncodes
Posted
have 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!
@erictan86
Posted
@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.
@darryncodes
Posted
excellent 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 helpful
@erictan86
Posted
@darryncodes thanks very much. let me try them in the next project.