Problem
Fifteen of the twenty-four PNG files under public/images/ are not decodable images. Their PNG signature is missing a byte:
avatar-1.png (corrupt): 89 50 4e 47 0a 1a 0a 00
logo.png (healthy): 89 50 4e 47 0d 0a 1a 0a
^^ the 0d is goneEvery 0d 0a (CRLF) in the file has been collapsed to 0a (LF) — a text-mode / line-ending normalisation applied to a binary. file reports them as data rather than PNG image data, and browsers refuse to render them: an <img> fires error, while fetch() on the same URL returns 200 with content-type: image/png, which makes it look like a loading problem rather than a corrupt file.
They were already corrupt when first committed (bfdd8a32, May 2025) — git show bfdd8a32:public/images/avatars/avatar-1.png has the same broken signature. So this is not git mangling them on checkout and there is no .gitattributes rule to blame (the repo has none); the blobs themselves are bad, from before they entered this repository. Most look like stock Stacks scaffolding.
Affected
public/images/atomic-fx-diagram.png
public/images/atomic-ui-diagram.png
public/images/diagram.png
public/images/avatars/avatar-1.png … avatar-5.png
public/images/screenshots/contacts.png
public/images/screenshots/expenses.png
public/images/screenshots/inventory.png
public/images/screenshots/payroll.png
public/images/screenshots/profit-loss.png
public/images/screenshots/reporting.png
public/images/screenshots/vat-returns.pngHealthy, for contrast: bench/logo.png, logos/*.png, og-image.png, social.png, app/bench-review-app-icon.png, bench/hero-image-v1.png, screenshots/dashboard.png.
Impact today: none. None of the fifteen is referenced anywhere in resources/, app/ or config/ — I checked each filename. They are all unused scaffolding. They are copied into dist/ and shipped, so they are dead weight in the artifact, but nothing renders them.
Why file it anyway: it is a trap, and it caught me. avatars/avatar-1.png is the obvious thing to reach for as a placeholder or a test fixture — I used it as a fixture while verifying the admin photo thumbnails, spent a while establishing that my markup was fine, and only found the cause by running file on the asset. The next person doing the same will lose the same time. A broken file that looks present is worse than a missing one.
Acceptance criteria
- Every
.pngunderpublic/images/passesfile -b … | grep '^PNG image data' - Unreferenced scaffolding assets are deleted rather than replaced, unless something is actually going to use them (the five avatars are the only plausible keepers — a real placeholder set would be useful)
dist/no longer ships undecodable images- Optional: a check in
gate.tsorscripts/validate-release.tsasserting that every shipped image decodes, so a corrupt binary cannot enter the artifact unnoticed again
Found while implementing the admin photo thumbnails for #51.