Skip to content

fix(social): render generated images in workerd - #336

Merged
guidefari merged 2 commits into
prodfrom
fix/social-image-production-render
Sep 18, 2026
Merged

guidefari merged 2 commits into
prodfrom
fix/social-image-production-render

Conversation

@guidefari

@guidefari guidefari commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Closes #335.

Production Open Graph image requests failed because the worker attempted to compile Yoga and Resvg WASM at request time, which workerd disallows. This imports both binaries as compiled Worker modules and upgrades Satori to the release that correctly accepts a WebAssembly.Module; fonts and remote artwork continue through the existing asset loaders.

The regression suite now executes both the worker request path and a real PNG rasterization inside workerd, and is included in the repository-wide test command.

Validation

  • bun run test
  • bun precommit

Test evidence

A production-model tweet card rendered by the same workerd path now covered by CI (1200×630 PNG, with artwork, author metadata, and track presentation intact):

Generated tweet Open Graph card rendered in workerd

"type": "module",
"scripts": {
"test": "vitest run",
"test": "vitest run src/render.test.tsx && vitest run --config vitest.workerd.config.ts",

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? seems unecessary

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Followed up in #337: the package is back to a single vitest run, and the retry case now runs under the same workerd configuration and production-style WASM/assets as the rest of the worker tests.

@guidefari
guidefari merged commit 7087dc8 into prod Sep 18, 2026
4 checks passed
github-actions Bot pushed a commit that referenced this pull request Sep 18, 2026
## [2.96.1](v2.96.0...v2.96.1) (2026-09-18)

### Bug Fixes

* **social:** render generated images in workerd ([#336](#336)) ([7087dc8](7087dc8))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.96.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Production generated tweet Open Graph images return HTTP 500

2 participants