Skip to content

next/og compatible function built on Satori #442

Open

Description

@ogawa0071

Summary

It would be great if Void provided an ImageResponse compatible with next/og, so OG images can be generated from JSX in Void apps (e.g. import { ImageResponse } from 'void/og').

Motivation

Most apps need dynamic OG images, and next/og is the API most people (and coding agents) already know. If existing next/og code worked by just changing the import, moving from Next.js/Vercel to Void would be much easier.

Setting this up yourself on Workers is surprisingly tricky. Satori and resvg ship Wasm that has to be loaded as precompiled modules on workerd, and recent Satori versions don't run on Workers out of the box. This feels like something Void could solve once for everyone. vinext already has a next/og shim, but that only helps vinext apps.

Why Satori and not Cloudflare Images

Cloudflare Images can transform and overlay images, and recently added basic text rendering. But it has no layout engine: no JSX/HTML/CSS input, no flexbox, no nested styled elements. So it can't reproduce what next/og does. next/og itself is built on Satori + resvg, so building on vercel/satori is the most straightforward way to get the same output.

If this direction is appropriate, I would be happy to help implement the prototype.

Activity

  1. changed the title [-]next/og compatible function built on Satori[/-] [+]`next/og` compatible function built on Satori[/+] on Oct 15, 2026
  2. cpojer commented on Oct 16, 2026

    @cpojer
    Member

    I'd like to see what this could look like as a PR!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions