Recommendations for image rendering in a worker?

I’m interested in rendering some images in a worker. As an example, I’d like to be able to generate OG image tags on the fly. Does anyone have any recommendations for good, fast and lightweight ways to do this?

I’d like to do the sort of stuff you can do in the browser, just in a worker. Unfortunately it doesn’t look like Canvas2D or WebGL are available on the server side (yet? I see WebGPU is in development…)

I guess maybe some wasm-wrapped C library would work? Cairo or Skia, or something really light like STB?

Or possibly I could just generate SVG rather than bitmaps, hmm.

Any advice appreciated!

Try out workers-og

1 Like

Thank you for the tip, I’ll check it out!