OG image generation #8299
Describe the problemHello, I'm looking for providing easy way to dynamically generate open-graph images using Sveltekit. This function exists in Next.js but not in Sveltekit. Describe the proposed solutionIs it possible to make something like https://www.npmjs.com/package/next-api-og-image? Alternatives consideredNo response Importancenice to have Additional InformationNo response |
Replies: 3 comments 6 replies
|
See https://geoffrich.net/posts/svelte-social-image/ and sveltejs/sites#412 for examples |
|
Does anyone have a good pattern for static image generation? I.e. using adapter-static and generating a templated OG image for each page, based on, for example, the title and description. I've been playing around with some options but unclear where to store files to make it DRY: single SEO route/og.png?title=Foo&description=bar problem: cannot access the search params in SSG many SEO routes/foo/og.png problem: needing to create many +server.js files is a pain something else? |
|
For future reference, take a look at sveltekit-og: |
For future reference, take a look at sveltekit-og:
og.pngfor docsog.pngroutes