| 1 | --- |
| 2 | name: og-image |
| 3 | description: Configure Open Graph preview image for social sharing |
| 4 | --- |
| 5 | |
| 6 | # Open Graph Image |
| 7 | |
| 8 | Set preview image for social media sharing. |
| 9 | |
| 10 | ## Custom URL |
| 11 | |
| 12 | ```md |
| 13 | --- |
| 14 | seoMeta: |
| 15 | ogImage: https://url.to.your.image.png |
| 16 | --- |
| 17 | ``` |
| 18 | |
| 19 | ## Local Image |
| 20 | |
| 21 | Place `./og-image.png` in project root - Slidev uses it automatically. |
| 22 | |
| 23 | ## Auto-generate |
| 24 | |
| 25 | Generate from first slide: |
| 26 | |
| 27 | ```md |
| 28 | --- |
| 29 | seoMeta: |
| 30 | ogImage: auto |
| 31 | --- |
| 32 | ``` |
| 33 | |
| 34 | Uses Playwright to capture first slide. Requires playwright to be installed. |
| 35 | |
| 36 | Generated image saved as `./og-image.png` - can be committed to repo. |
| 37 |