Repository navigation
Replies: 1 comment
|
Adding a second reason to re-vendor: Re-vendoring |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Goals
direction: 'rtl'(satori 0.50.0 or later).next/og.Non-Goals
Background
Satori added
direction: 'rtl'and thedirattribute in vercel/satori@7588b06 (feat: Supportdirection: rtl(#882), 2026-10-12). Per the commit message, flex rows, block boxes, text lines, textAlign start/end and bidi word order then start from the right. The latest satori release is 0.63.2. The long-standing RTL issue is vercel/satori#74.next@16.4.2 ships next/dist/compiled/@vercel/og at version 1.0.1, which bundles satori 0.29.0. On npm, next@canary (16.5.0-canary.25) still vendors @vercel/og 1.0.1 at packages/next/src/compiled/@vercel/og/package.json. The npm package @vercel/og@1.0.3 depends on satori 0.33.5, so it is also older than the RTL change.
In an opengraph-image route with Persian text and
direction: 'rtl'on the root element, I see no right-to-left layout with the bundled satori. Flex children are not reordered and text is not aligned to the right. The only workaround is to hand-mirror the layout with flexDirection: 'row-reverse' and justifyContent: 'flex-end'.Alternative today: skip next/og and call satori directly with a PNG renderer such as sharp. That means giving up ImageResponse, so the file-convention integration is lost for RTL sites.
Precedent: #72940 asked for a satori update and was fixed by #72954 ("Upgrade vercel og").
Proposal
Bump @vercel/og in packages/next/src/compiled/@vercel/og to a version built on satori 0.50.0 or later, ideally the latest release, as was done in #72954.
I'm happy to help test a canary build with a Persian opengraph-image. I can also provide a minimal reproduction, based on reproduction-template, that compares the layout before and after.
All reactions