Files
supabase/apps/www/lib
Alan Daniel 2ab1083b21 fix(www): bust social-media cache for dynamic OG images (#44673)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Bug fix

## What is the current behavior?

Social-media crawlers (X, LinkedIn, etc.) cache the dynamic OG images
generated by the `generate-og` Edge Function. When an OG image is
updated or a crawler caches the wrong image, the stale version persists
indefinitely because the URL doesn't change between deploys.

## What is the new behavior?

`getAbsoluteBlogSocialImage` now appends a `&v={timestamp}` parameter to
OG image URLs that point to the `generate-og` Edge Function. The
timestamp is evaluated once at build time (`Date.now()`), so each deploy
produces unique meta tag URLs that bypass crawler caches. Static image
URLs are left untouched.

## Additional context

Only affects the `og:image` and `twitter:image` meta tags — on-site
thumbnails and other image references are unchanged.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

* **Bug Fixes**
* Fixed cache refresh behavior for dynamically generated OG images to
ensure updated content is served with each deployment.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-08 10:03:59 -04:00
..
2026-04-02 19:49:28 +01:00
2024-09-17 11:07:38 +02:00
2025-09-05 16:57:28 -02:30
2025-11-18 18:56:11 +00:00
2025-11-18 18:56:11 +00:00
2026-02-23 15:47:03 +00:00
2026-01-12 10:19:08 -04:00
2025-09-05 16:57:28 -02:30
2026-03-11 14:11:26 +01:00
2025-11-13 20:02:42 +11:00
2025-09-03 14:49:28 +02:00
2023-10-13 14:07:36 -07:00
2025-10-24 11:06:31 +02:00
2025-09-03 14:49:28 +02:00
2025-09-03 14:49:28 +02:00