Skip to content

Remove the share images' unread .alt.txt files - #1043

Merged
richshaw merged 2 commits into
mainfrom
claude/laughing-dijkstra-bcwqdv
Nov 17, 2026
Merged

richshaw merged 2 commits into
mainfrom
claude/laughing-dijkstra-bcwqdv

Conversation

@richshaw

@richshaw richshaw commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Next reads opengraph-image.alt.txt and twitter-image.alt.txt as metadata only when they sit beside the image in src/app. Since #898 moved the share images to public/, the alt text has come from SHARE_IMAGE.alt in src/lib/seo.ts (passed through SHARE_IMAGES in the root shell and pageMetadata). The two .txt files were left behind as stray static files. The only thing that read them was seo.test.ts, checking that they matched SHARE_IMAGE.alt.

Changes

  • Delete public/opengraph-image.alt.txt and public/twitter-image.alt.txt.
  • seo.test.ts still checks each PNG's width and height on disk, but no longer reads the alt files.
  • Update the comments in seo.ts and scripts/generate-og-image.mjs. The generator's comment now says that nothing checks the alt text, so whoever changes the words on the image has to update SHARE_IMAGE.alt too.
  • Add a CHANGELOG entry under Removed for the two URLs that no longer exist.

Checks

  • pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test: all pass (244 files, 3515 tests).
  • Tophat on pnpm dev: the landing page's og:image:alt and twitter:image:alt still give the full alt text, /opengraph-image.png returns 200, and /opengraph-image.alt.txt now returns 404. No screenshots, because nothing on any page looks different.
  • /code-review: found no correctness issues. Its three minor notes (CHANGELOG entry, the generator comment's wording, a reminder about keeping the alt text in sync) are addressed in the second commit.

🤖 Generated with Claude Code

https://claude.ai/code/session_016YZ9STi3of9KWzDGRP3CNY

Next reads opengraph-image.alt.txt and twitter-image.alt.txt as metadata only
beside the image in src/app. Since the images moved to public/ (#898), the
alt text has come from SHARE_IMAGE.alt, and the two files were served as
stray static files that only seo.test.ts read, to check they matched it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9STi3of9KWzDGRP3CNY
@richshaw
richshaw merged commit 180bb0b into main Nov 17, 2026
5 checks passed
@richshaw
richshaw deleted the claude/laughing-dijkstra-bcwqdv branch November 17, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants