Blogpost challenge with vanilla html and css

Solution retrospective
I would like to know why the pictures do not load unless I put them in the same folder as the src files but works in local server
I have completed the challenge but the photos do not load on vercel or netlify unless I put them in the src folder which is just bad practise
Please log in to post a comment
Log in with GitHubCommunity feedback
- P@mkerr-github
"I would like to know why the pictures do not load unless I put them in the same folder as the src files but works in local server"
It is most likely an absolute vs relative path issue
It sounds like the problem you're encountering might due to the way paths are being resolved, especially between a local file system and a deployed server environment like Vercel or Netlify.
When you run a project locally relative paths can behave differently compared to when the project is served by a real web server. In a deployed environment, the server expects file paths to be correctly mapped to the public URL structure etc., not to your local folder structure.
Understanding Relative File Paths : https://www.codingrooms.com/blog/file-paths
If you found anything in this comment helpful:
Please remember to click the ‘Mark as helpful’ button, thank you!
Keep up the good work, and keep going! 👋
- @LostProcessor
You could use differents tags inplace of the p tag like h1 or h2 .
Join 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