Twitter Card / Open Graph Image Generation

Is it possible to support Twitter card generation for generated pages. This can be a HTML template which is saved as an image. The HTML template and card template can be generated. The Card template output can be referred in the HTML template.

That can be done automatically on your site by adding it to your template no?

How is this done? Can you give me a pointer?

I believe this can be achieved by resource/asset processing pipelines in Hugo.

Ah sorry I thought when you meant Twitter card you mean the preview of the website on Twitter. Do you mean actual images?

Generating images like in: (GitHub - vercel/og-image: Open Graph Image as a Service - generate cards for Twitter, Facebook, Slack, etc). But more light weight and built in to Zola.

This can be another HTML template which can invoked from the page template to generate the in memory or temporary output then this output can be rendered using and embedded headless browser component and saved as an image and linked. This way it will be generic and not limited to generating Twitter Card / Open Graph Images this the possibility to have other pipe lines in the future.

Hmm that would be a bit tricky to implement in Zola, I would need to see many people wanting that before thinking of implementing it.