Folder items not loading in content

Question: Repl folders not loading in content

In html i am trying to get a file in a folder but it wont load in, even though i have the right file path. The src i have selected is Flags/ca.png. Why won’t this work? ca.png is a file. Here is my code:

<main><img src="Flags/ca.png"><h2>Canada</h2></main>

Screen Shot 2024-02-03 at 7.35.20 PM

1 Like

Hi @Chase305 , welcome to the forums!
Try any of these and see if they work:

<main><img src="/Flags/ca.png"><h2>Canada</h2></main>


<main><img src="./Flags/ca.png"><h2>Canada</h2></main>

Hope this helps!

for some reason neither of those work either.

Could you send a screenshot of what is inside the Flags folder?

Hi! The list of items in the folder is too long to screenshot it all, but here is the portion with the image:

Maybe try:

<main><img src="Flags\ca.png"><h2>Canada</h2></main>

using a backslash?

dang it! This doesn’t work either… in some areas like in script tags when i add it using jquery, it sets bugs out the code.

I’m stumped. Is ypur program a pure HTML, CSS, JS program or is it something with a backend (Flask, Express)?

no there are no backend things just html css and javascript as far as im aware. Could this be an issue on replits side? If you create a new project, do you have the same issues?

Trying to test it but I get Not Found[1]. Maybe you could try forking this repl and test it?

  1. No, index.html isn’t renamed or in any folder, and the route is at /. ↩︎

what is forking? How should i “fork” it?

When you are in the cover page, press the Fork and Run button in green.

i can load that image in, which i renamed ca.jpg. Im so confused

Try forking your own repl and test it.
At the top-left corner of your repl (be inside the editor), click on the name, then Fork. Try running the forked version.

the forked project of your forked project runs fine

Can you please provide a link to your Repl? That way we’re going in a little less blindly. Follow the guide below to share it:

here is my project: look on the “Find” page

here is my project: look on the “Find” page there is the code

No, I meant forking your original repl, not my repl.

I see the Canadian flag just fine (it’s just huge):