Does there exist a tool that can render HTML code to an image file? I'm writing a scifi novel and I have an idea to include images of social media threads as chapter headings. I have some experience with web development, and I want to create my own version of Twitter for the story (it can't actually be twitter since the story is set a couple centuries in the future).
A while back I looked for Chrome extensions that could do something like this, and I found several that take screenshots. I was dissatisfied with this solution because (if I'm remembering correctly) I had to scroll my webpage up and down to get the whole thing as one screenshot. The dimensions of the resulting image were inconsistent and completely tied to my input. The whole procedure was undesirable since I might need to suddenly revise the text of these social media comments, reload my website in Chrome, and use the extension to screenshot.
I would prefer something that can handle an entire JS framework such as vue, but I will settle for anything that does html and css. Does such a tool exist or am I stuck using screenshots?