<Link href="/">
<Image
src="/logo.png"
width={115}
height={43}
alt="Reef Trader"
/>
</Link>
#Static image is not loading
32 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
does logo.png exist in the root of the public folder? as the html could be from a 404 page.
Yes, I included a picture of the file structure up above
and if you manually go to logo.png, is there an error that is displayed
or just when imported
i mean in test in browser
Would that just be port/logo.png? 404
do you have basepaths enabled?
as next/image doesn't respect them 😭
and otherwise, why ere you /logo.png in code nut port/logo.png there?
I do not have basepaths enabled
so why did you mention port then?
localhost:3000 is the test url in browser
So I was asking if to test for the image in browser if I would type "localhost:3000/logo.png"
ohh yeah
yeah returns a 404
and you are sure that the file is in the public folder and nothing else (and in the first layer, not any sub paths)
and do those other public files work?
ahh that doesn't matter because:
The /public directory should remain in the root of your project.
https://nextjs.org/docs/app/building-your-application/configuring/src-directory
the other files are not working
yeah because of this...
move the public folder to the same folder as next.config.js
and it should work
@woven ivy can you mark it as solved, so to tell others you have fixed this issue 🙂
you have to use the command, as the image shows