Deployed site
Source code
Everything works fine in the local preview build (vite preview
), so I’m sure this is a Netlify problem and not a Vite problem. All the images are put in public
, and are referenced directly e.g. <img src={/boards/${board}.png
} />, so I don’t know what else I’m missing here?
You shouldn’t be so sure of that.
You’re missing the fact that the images are broken in your GitHub repository too, examples:
/boards/green.png
https://game-review-vietan0.netlify.app/boards/green.png
https://github.com/vietan0/chess-game-review/blob/main/public/boards/green.png
/pieces/neo/br.png
https://game-review-vietan0.netlify.app/pieces/neo/br.png
https://github.com/vietan0/chess-game-review/blob/main/public/pieces/neo/br.png
If I pull down your repository I find that your images are also broken on my local system.
If you find why your images are all broken, and fix them, then they’ll work everywhere.
Thanks for replying! I thought of that too, right before reading your message It was indeed a problem with line endings specified in .gitattributes
that made all the images broken, not caused by Netlify.