It Worked on My Machine: The Filename Case Trap on Vercel
Everything looked perfect on my machine. The images loaded, the layout was spot on, and I deployed to Vercel feeling rather pleased with myself. Then I opened the live site and found a row of broken images staring back at me.
It took me an hour of troubleshooting to find the cause. I was convinced the path was wrong, so I checked the public folder, rewrote the src attributes, tried relative and absolute paths, and even redeployed a couple of times in case something had gone wrong with the build. None of it made any difference. In the end, it turned out not to be a path issue at all, but a case issue. My code referenced /images/Profile.png, while the actual file was called profile.png.
The reason it worked locally comes down to the file system. Windows, and macOS by default, are case-insensitive, so Profile.png and profile.png are treated as the same file. Vercel builds and serves your project on Linux, which is case-sensitive. To Linux, those are two completely different files, and one of them simply does not exist.
There is a second trap waiting once you spot the problem. On Windows, Git usually ignores case-only changes, so renaming Profile.png to profile.png in Explorer may not register as a change at all. Using git mv Profile.png profile.png makes sure the new name actually reaches the repository.
Since then, I have stuck to a simple rule: every filename is lowercase, with hyphens instead of spaces, such as profile-photo.png. It removes the guesswork entirely, and I no longer need to remember how I capitalised something months ago.
If something works perfectly in development but breaks after deployment, check the case of your filenames before anything else. It might save you an hour.