That's a really good question. There are libraries to make images out of code, surely that's how they do it. Maybe using SSR they create the meta tags for the image and check if the image exists and if not, they create it.
Tapas Adhikary
Educator @tapaScript | Founder CreoWis & ReactPlay - Writer - YouTuber - Open Source