Set up Open Graph (preview) images for my blog in Elixir and wrote up the work involved. You can see a sample image on this post I think!
The post should have everything you need to do it yourself if you want to, but I also link to a little NimblePublisher style library I wrote to do the same (which I’m now using).
I’ve been there and the only nitpick would be I wanted the actual image to take precedence over the generated one, if the page has an embedded image already.
Mine has been launched in the before-publisher era, but I believe it should not be too complicated to add such a functionality to ogmate. If you are interested in, I might provide a PR.
This is a scenario where the post has eg a header image? I think that might live in the non-library part, ie the part that picks what to put in the metadata?