If you see a 404 error for logo.png when opening index.html directly in a browser, it's because browsers restrict loading local files when using the file:// protocol.
Python:
cd website
python -m http.server 8000Then open: http://localhost:8000
Node.js:
cd website
npx http-serverVS Code:
- Install "Live Server" extension
- Right-click
index.html→ "Open with Live Server"
If you must use file://, try:
<img src="file:///C:/Users/Legion/Desktop/PersistenceCLI/website/assets/logo.png" />Note: This only works on your machine and won't work when deployed.
For a self-contained HTML file, you can embed the logo as base64, but this makes the HTML file very large (~1MB+).
- Logo location:
website/assets/logo.png - HTML path:
src="assets/logo.png" - Works when: Served from a web server (not file://)
When you deploy to a web server (Cloudflare Pages, Vercel, etc.), the relative path assets/logo.png will work perfectly.