Skip to content

fix(www): use imgSocial for blog OG images#2514

Open
everettbu wants to merge 8 commits into
masterfrom
dnywh/fix/blog-images
Open

fix(www): use imgSocial for blog OG images#2514
everettbu wants to merge 8 commits into
masterfrom
dnywh/fix/blog-images

Conversation

@everettbu

Copy link
Copy Markdown

Mirror of supabase/supabase#43842
Original author: dnywh


What kind of change does this PR introduce?

  • Bug fix that resolves DEPR-396
  • Additional improvements to blog post image handling

What is the current behavior?

Blog post Open Graph metadata often prefers imgThumb over imgSocial, so social previews on X, iMessage, and similar surfaces can render the on-site thumbnail instead of the intended social image.

The image selection and path-normalization rules are also duplicated across blog surfaces, which makes the precedence rules easy to drift.

What is the new behavior?

  • Centralizes blog image handling in apps/www/lib/blog-images.ts
  • Uses imgSocial first, then imgThumb, for blog OG/Twitter metadata
  • Uses imgThumb first, then imgSocial, then the placeholder, for blog thumbnails and post hero images
  • Normalizes relative blog image paths into absolute URLs for metadata
  • Adds warning-only validation during content reads/builds for partial or malformed imgSocial / imgThumb config
  • Updates a few recent blog posts so imgThumb is a thumbnail-only asset instead of duplicating the social image

Additional context

  • Replaces #42319 with the additional above fixes
  • Added unit coverage for the shared image helper

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.

3 participants