Category: Laravel, Laravel, PHP, PHP

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.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners