Images broken only live? Check the case

Everything looked fine while you were building. The logo showed up, the hero image loaded, every page opened. Then you deployed the site you made with Lovable, Bolt, Replit, v0 or Cursor, and a few things are simply missing: a broken image icon where your logo should be, a font that falls back to Times, or a whole page that goes blank. Very often the cause is a difference in upper and lower case letters in a file name.

The symptom

This problem has a recognisable pattern:

  • Some images, icons or fonts show as broken on the live site but worked on your own computer.
  • The build fails on your host with an error like Could not resolve "./components/Header" or Module not found, even though the file is clearly there.
  • In the browser console you see 404 errors for files such as /images/Logo.png, while the file in your project is called logo.png.

The cause

Most laptops ignore letter case in file names. On a standard Mac or Windows setup, Logo.png and logo.png are treated as the same file, so a link to one quietly finds the other. The servers that build and host your site almost always run Linux, where those are two different names. A link to Logo.png on Linux finds nothing if the file is called logo.png.

So the mismatch can hide for weeks until the code reaches a machine that takes case seriously. Common ways it gets in:

  • You renamed a file only by changing its case, for example header.tsx to Header.tsx. Git on a case-insensitive laptop often doesn't record that kind of rename, so the repository keeps the old name while your code imports the new one.
  • An AI edit wrote an import or image path with different capitals from the real file.
  • You uploaded images from your computer and the file extension came through as .PNG or .JPG, while the code says .png or .jpg.
  • You pulled the project to your laptop through GitHub, edited it in Cursor or another editor, and pushed it back.

Step-by-step diagnosis

  1. Open the live page with the browser's developer tools. Go to the Network tab, reload, and filter for failed requests. Note the exact path of every 404, capitals included.
  2. Compare that path with the real file name. Look at the file in your project's file tree or on GitHub, not on your laptop. GitHub shows the name exactly as the repository stores it. If the request says Hero.jpg and GitHub says hero.JPG, you've found it.
  3. Read the build log on your host. If the build failed, the first Could not resolve or Module not found line names the import. Search your code for that import and check the capitals against the real file.
  4. Check for case-only renames in git. On your laptop, run git ls-files | grep -i header (swap in the file name). If git lists a different case from what you see in your editor, git never picked up the rename.

Fixes per builder or host

Lovable, Bolt and v0

These run your project in the cloud, so the editor and the build usually agree. The mismatch normally comes from an upload or an edit that wrote the wrong capitals. Ask the builder to rename the file to all lower case and update every reference to it, then check the preview and redeploy. Give it the exact old and new names.

Cursor or any local editor with GitHub

Rename the file in two steps so git notices: git mv Header.tsx temp.tsx, then git mv temp.tsx Header.tsx, and commit. Then fix the imports to match exactly and push.

Replit

Replit workspaces run on Linux, so a wrong case usually breaks in the workspace as well as in the deployment. If it works in the workspace but not when deployed, check whether the deployment builds from a different branch or an older commit.

Netlify, Vercel and Cloudflare Pages

All of these build on Linux, so they'll show the real error in the build log. Fix the names in the repository rather than in the host's settings, then trigger a fresh deploy. Clear the build cache if old names linger.

How to verify

  • Load the live site in a private window and confirm the Network tab shows no 404s for images, fonts or scripts.
  • Check the host's build log for a clean build with no resolve warnings.

Prevention

  • Use lower case with hyphens for every file you add: hero-image.jpg, not Hero Image.JPG.
  • Rename uploads before you add them to the project, including the extension.
  • Never rename a file by changing only its case without the two-step git move.
  • After each deploy, glance at the live site for broken images, or let an automated check spot missing files for you.
If it works on your laptop but not live, compare the exact letters in the file name first.

Run the free 30-second check to see whether your live site has broken images, missing files or other problems right now.

Run the free 30-second check

← All posts

FlowCanary on SaaSHub