Summary
Several committed icon files under public/icons/<category>/ carry .jpg or .png extensions but actually contain WebP bytes (RIFF...WEBP magic header). This was inherited from the v0.9.1 wiki scrape — the resolver wrote whatever extension Fandom served, but the underlying bytes were sometimes WebP regardless. Manifest then advertises the wrong type, and CDN-served Content-Type headers match the (incorrect) extension.
Why it works today
Browsers sniff content type from the magic bytes, not the URL extension or Content-Type header. So images render correctly despite the mismatch. This is a correctness-adjacent issue: the manifest lies about the format, which affects:
- Future tooling that trusts the manifest's declared extension
- Image-optimization pipelines that key on extension
- Strict CDN configurations that refuse to serve format mismatches
Fix sketch
- Scan
public/icons/<category>/* for files where the magic bytes don't match the extension.
- For each mismatch:
- Rename to the correct extension (
.webp, .png, .jpg per actual content)
- Or re-encode to a single canonical format (e.g. PNG via sharp) for consistency
- Regenerate
public/icons/manifest.json to reflect the corrected extensions.
- If keeping
.webp: confirm the <ItemIcon> resolver and any consumers handle WebP correctly (they should — modern browsers all support it).
Out of scope
- Re-running scrapers.
- Changing render behavior in
<ItemIcon>.
Acceptance criteria
References
Summary
Several committed icon files under
public/icons/<category>/carry.jpgor.pngextensions but actually contain WebP bytes (RIFF...WEBPmagic header). This was inherited from the v0.9.1 wiki scrape — the resolver wrote whatever extension Fandom served, but the underlying bytes were sometimes WebP regardless. Manifest then advertises the wrong type, and CDN-servedContent-Typeheaders match the (incorrect) extension.Why it works today
Browsers sniff content type from the magic bytes, not the URL extension or
Content-Typeheader. So images render correctly despite the mismatch. This is a correctness-adjacent issue: the manifest lies about the format, which affects:Fix sketch
public/icons/<category>/*for files where the magic bytes don't match the extension..webp,.png,.jpgper actual content)public/icons/manifest.jsonto reflect the corrected extensions..webp: confirm the<ItemIcon>resolver and any consumers handle WebP correctly (they should — modern browsers all support it).Out of scope
<ItemIcon>.Acceptance criteria
public/icons/<category>/has an extension that matches its magic bytes.References