How to find missing images in a Ren'Py project before release
Missing image errors in Ren'Py games share a frustrating property: they only appear when the engine tries to display the image. If the reference lives in a branch your testers never reach, the bug ships. The player finds it.
Static scanning — checking script references against files on disk before running anything — catches these before they become runtime errors. Here's how it works and what to look for.
Why missing images happen
The most common causes are not careless mistakes. They're structural:
show bg_city_night call has an underscore where the filename uses a space, or vice versa.
BG_City.png vs bg_city.png.
None of these are caught at write time. Ren'Py scripts don't validate image paths when you type them — only when the engine needs to render them.
Why Ren'Py errors are hard to trace at runtime
When a missing image is encountered, Ren'Py produces an error like this:
The error is clear enough on its own. The problem is that line 847 might be inside a story branch that requires a specific sequence of choices made earlier in a 40-minute playthrough. Your testers need to know that path exists, remember to take it, and happen to reach that specific scene. All three conditions have to be true simultaneously.
How static scanning detects missing assets
Static scanning works differently from running the game. Instead of following one path
through the story, it reads every .rpy file and collects every image reference —
regardless of which branch it appears in.
The references it looks for include:
image bg_city_night = "images/bg_city_night.png"— explicit image declarationsshow bg city night— display calls (using Ren'Py's image naming convention)scene bg city with dissolve— scene transitionsadd "images/ui_frame.png"— direct path references
Each collected reference is then checked against the files present on disk. Any reference with no matching file on disk is a missing asset.
Common error patterns and what they mean
Image named with spaces vs underscores
Ren'Py maps image names to files using a specific normalisation rule. A file named
bg_city_night.png is automatically available as bg city night
in display calls. But if you've moved or renamed the file to bg-city-night.png
(with hyphens), the mapping breaks silently.
Path reference pointing to a deleted folder
Placeholder reference never replaced
How to run a missing asset check with BranchPy
In BranchPy's Media Validation panel, missing assets appear with a MISSING badge in the media browser. They are listed regardless of which branch contains the reference — the entire script is scanned, not just paths your testers have played.
Each MISSING entry shows the file path that was referenced and confirms it is absent from disk. No runtime required. No need to navigate to that story branch.
What to do when you find a missing asset
- Check whether the file was renamed or moved — search your asset folder for the base filename, ignoring path and extension. It often still exists under a changed path.
- Check for case mismatches — compare the exact casing of the filename in the script reference against the file on disk.
- Check whether the asset was intentionally removed — if so, update the script reference. Don't leave dead references pointing at nothing.
- If the file was never created — create a placeholder now so the error disappears from the scan. Replace it before release.
Summary
- Missing images only trigger at runtime, in the specific branch that references them.
- Branching structure means those branches may never be reached during manual testing.
- Static scanning reads every reference in the entire script, not just the paths a tester followed.
- Every missing asset found before release is a crash your players will never see.
.rpy file, detects missing
asset references, and flags protected engine-managed files — directly in VS Code.
See how Media Validation works →