@vercel/og 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -7
- package/dist/index.edge.js +1848 -1807
- package/dist/index.edge.js.map +1 -1
- package/dist/index.node.js +1848 -1807
- package/dist/index.node.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
# Open Graph Image Generation
|
|
2
2
|
|
|
3
|
-
Generate Open Graph images with Vercel’s
|
|
3
|
+
Generate Open Graph images with Vercel’s API route functions
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
7
|
-
Install `@vercel/og`, then use it inside an API route
|
|
7
|
+
Install `@vercel/og`, then use it inside an API route in your Next.js project:
|
|
8
8
|
|
|
9
9
|
```jsx
|
|
10
10
|
// /pages/api/og.jsx
|
|
11
11
|
import { ImageResponse } from '@vercel/og'
|
|
12
12
|
|
|
13
|
-
export const config = {
|
|
14
|
-
runtime: 'experimental-edge',
|
|
15
|
-
}
|
|
16
|
-
|
|
17
13
|
export default function () {
|
|
18
14
|
return new ImageResponse(
|
|
19
15
|
(
|
|
@@ -43,7 +39,7 @@ Read more about the API, supported features and check out the examples in the fo
|
|
|
43
39
|
|
|
44
40
|
## API Reference
|
|
45
41
|
|
|
46
|
-
`@vercel/og`
|
|
42
|
+
`@vercel/og` supports both [Node.js Runtime](https://vercel.com/docs/concepts/functions/serverless-functions/runtimes/node-js) and [Edge Runtime](https://vercel.com/docs/concepts/functions/edge-functions/edge-runtime).
|
|
47
43
|
|
|
48
44
|
The package exposes an `ImageResponse` constructor, with the following options available:
|
|
49
45
|
|