HTML to Images for Social Sharing
I had seen some posts on Mastodon that had nice, seemingly automatically generated images when they were shared on social platforms like Mastodon. I found some services like Bannerbear that create images based on a template. That got me thinking, is ther a way to do this for free on my own?
html2canvas does exactly that, and is wonderful. It was easy to get working, and I made a template that I can easily update from my web browser. I posted the code on my github if you’d like to try it out yourself. It was used to create the opengraph image for this very post.