top | item 36665437

(no title)

bencevans | 2 years ago

I've recently used this approach for generating Open Graph images for display when a link to the site is used on Twitter, WhatsApp, Facebook, etc [1]. I was pleasantly surprised at how quickly something could be implemented. The last time I'd done something similar was using Cairo and needing to write more of the scaling dynamics. I don't think I ever got it to adjust to dynamic content very well. This time I put together a prototype in Inkscape, converted it to a template and render it to PNG with Sharp [2].

[1]: https://hntrends.net/api/og?word=twitter [2]: https://github.com/lovell/sharp

discuss

order

No comments yet.