To make our documentation pages look nicer, when being shared on Twitter, Slack or Facebook, I manually create open graph images, like this one: Or this one: And this is quite a time consuming task having to do this manually every time.
While this would work, I don't like this approach for a couple of reasons: I want this service to generate the images on-the-fly.
The alternative is to make use of serverless ✨ functions for this.
All you need to do is run: On your first run, Vercel is configuring the future deployment for you.
For this, all you have to do is run: This will deploy your application to the cloud and Vercel will give you a unique URL which you can use to see your image generation service in action.