DEV Community

Discussion on: How dev.to dynamically generates social images

Collapse
 
xowap profile image
Rémy 🤖

I would suggest a much simpler alternative: render your image as a webpage and use a headless browser to generate a screenshot.

The only issue is that the integration of browsers is not equal with all languages and often requires specific things to be installed that are a bit flaky, but in the end that's the same issue as PDF generation right?

Collapse
 
xowap profile image
Rémy 🤖

Also, social images are cached by the platforms themselves so there is no need for a CDN (as the CDN is provided by FB/Twitter/etc)