Skip to content
← Back to Community
CSS-2
Profile icon
BrainBox07

Please help! I can't upload my image. Even with the correct src link, it only displays the alt value.

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
BrainBox07
Comments
hotnewtop
Profile icon
Coder100

Change the src, for it is wrong. You made a local path, but replit only supports absolute paths.

Local paths are images only on your computer. Absolute paths are hosted by replit.

Change code:

<img src="/foodimg.jpg" alt="If it still doesn't work, rename foodimg to something else and rename it back.">
Profile icon
BrainBox07

I am so excited, it worked. I changed the path just as you described. Thank You @Coder100

Profile icon
Coder100
Profile icon
TheDNAHero

You need a body and a head, you forgot those

Profile icon
BrainBox07
Profile icon
TheDNAHero

I think you just include src=“Foodimg.jpg” that’s what I do and it works

Profile icon
BrainBox07

Thank you @TheDNAHero, I have done that but the image ain't uploading