Harden social preview image metadata #32

Merged
erik merged 1 commit from task-2494df77-preview-image-hardening into main 2026-06-27 22:43:11 -05:00
Owner

Summary

  • add og:site_name and richer image metadata for social cards
  • emit og:image:secure_url, og:image:type, og:image:alt, and twitter:image:alt
  • preserve markdown image alt text for preview image alt metadata

Verification

  • npm run typecheck
  • npm test -- --run src/routes/tests/public.test.ts
  • npm test
  • npm run build
  • Chromium dev article check confirmed hardened image metadata for slug-cli-init

Task: task-2494df77

Note: task should remain open after merge until this is released/deployed and verified in Chromium against live Mastodon/card behavior.

## Summary - add `og:site_name` and richer image metadata for social cards - emit `og:image:secure_url`, `og:image:type`, `og:image:alt`, and `twitter:image:alt` - preserve markdown image alt text for preview image alt metadata ## Verification - npm run typecheck - npm test -- --run src/routes/__tests__/public.test.ts - npm test - npm run build - Chromium dev article check confirmed hardened image metadata for `slug-cli-init` Task: task-2494df77 Note: task should remain open after merge until this is released/deployed and verified in Chromium against live Mastodon/card behavior.
Author
Owner

Review summary

Approved. The follow-up hardens social preview image metadata and preserves markdown image alt text for card image alt metadata.

Acceptance criteria coverage

  • Adds more complete OpenGraph image metadata: og:image:secure_url, og:image:type, and og:image:alt.
  • Adds twitter:image:alt.
  • Adds og:site_name.
  • Preserves first markdown image alt text for preview metadata.
  • Keeps no-image fallback behavior from PR #31 intact.
  • Tests assert the richer metadata.

Verification

  • npm run typecheck
  • npm test -- --run src/routes/__tests__/public.test.ts
  • npm test
  • npm run build
  • Chromium dev article check confirmed hardened image metadata for slug-cli-init.

Important follow-up gate

Do not close task task-2494df77 after merge alone. The task should remain open until this is released/deployed and verified in Chromium against live Mastodon/card behavior. Current live Mastodon card for status 116825331460865197 has card.image: null, so live verification is still required.

Blocking issues

None.

Verdict

Approved.

## Review summary Approved. The follow-up hardens social preview image metadata and preserves markdown image alt text for card image alt metadata. ## Acceptance criteria coverage - [x] Adds more complete OpenGraph image metadata: `og:image:secure_url`, `og:image:type`, and `og:image:alt`. - [x] Adds `twitter:image:alt`. - [x] Adds `og:site_name`. - [x] Preserves first markdown image alt text for preview metadata. - [x] Keeps no-image fallback behavior from PR #31 intact. - [x] Tests assert the richer metadata. ## Verification - `npm run typecheck` - `npm test -- --run src/routes/__tests__/public.test.ts` - `npm test` - `npm run build` - Chromium dev article check confirmed hardened image metadata for `slug-cli-init`. ## Important follow-up gate Do not close task `task-2494df77` after merge alone. The task should remain open until this is released/deployed and verified in Chromium against live Mastodon/card behavior. Current live Mastodon card for status `116825331460865197` has `card.image: null`, so live verification is still required. ## Blocking issues None. ## Verdict Approved.
erik merged commit c3934cdcb0 into main 2026-06-27 22:43:11 -05:00
erik deleted branch task-2494df77-preview-image-hardening 2026-06-27 22:43:11 -05:00
Sign in to join this conversation.
No description provided.