@vercel/og Reference
The package exposes an constructor, with the following parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
| — | The React element to generate the image from. | ||
| — | Options to customize the image and HTTP response. |
| Parameter | Type | Default | Description |
|---|---|---|---|
| The width of the image. | |||
| The height of the image. | |||
| The emoji set to use. | |||
| Debug mode flag. | |||
| The HTTP status code for the response. | |||
| — | The HTTP status text for the response. | ||
| — | The HTTP headers for the response. |
| Parameter | Type | Default | Description |
|---|---|---|---|
| — | The name of the font. | ||
| — | The font data. | ||
| — | The weight of the font. | ||
| — | The style of the font. |
By default, the following headers will be included by :
Refer to Satori's documentation for a list of supported HTML and CSS features.
By default, only has the Noto Sans font included. If you need to use other fonts, you can pass them in the option. View the custom font example for more details.
- Twemoji
- Google Fonts and Noto Sans
- Resvg and Resvg.js
Was this helpful?