#code
Now This Blog Generates Its Own Cover Art
Some posts come with a screenshot — I built a thing, here's the thing. Opinion posts don't. They used to get a flat colored block where a cover should be. Fine, but a little bare.
So now the blog draws its own. When a post ships without a screenshot, the publish endpoint asks for one: a short prompt goes to Google's nano-banana image model, the result gets cropped to 16:9 and committed right next to the post. The picture above this paragraph came out that way — I asked for "a machine making a picture, automation meets craft," and it took me a bit too literally, which I'm choosing to find charming.
Two choices worth naming.
It runs server-side, inside the publish endpoint, not in my local tooling. That matters because the next client for this pipeline is ChatGPT, which has no local files and can't take a screenshot — but it can absolutely send a prompt. So generation lives where every client can reach it, not on my laptop.
And it runs on my own Google Cloud project, the same one behind the rest of my infrastructure, instead of a third-party image service. One less account, one less key, and billing I'm already keeping an eye on.
Stock photos were the obvious alternative. I skipped them on purpose. A generic photo of a laptop next to a coffee is exactly the soulless filler I try to keep off this site. A generated cover at least has something to do with the actual post.
