Skip to content

Commit 890aee7

Browse files
committed
fix border
1 parent 074a55d commit 890aee7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

priv/posts/2026/05-19-generating-og-images.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Image.write!(canvas, "og.png")
6767

6868
And here’s the image I get from running it.
6969

70-
<img src="/images/og-image-example.png" alt="An example generated OG image from the snippet above" width="618" height="324 loading="lazy" decoding="async" style="margin-bottom:16px" />
70+
<img src="/images/og-image-example.png" alt="An example generated OG image from the snippet above" width="618" height="324" loading="lazy" decoding="async" style="margin-bottom:16px;border:1px solid #efefef;" />
7171

7272
# Hooking it up
7373

@@ -219,6 +219,6 @@ You probably want to tweak the cache headers you’re setting in the plug for `d
219219

220220
Having nice previews show up in social media and messaging apps when your links are shared is a lot of fun and it doesn’t necessarily take that much effort. This blog tries to separate things into clear layers, similar to how I implemented it myself, but you can probably get a minimal version working with half as many lines. Or you can try something even fancier by doing some macro magic to map your routes to images. The options are endless. Play around with it, try some different designs. Here’s the OG image for this blog post.
221221

222-
<img src="/images/generating-og-images.png" alt="An example generated OG image from the snippet above" width="618" height="324" loading="lazy" decoding="async" style="margin-bottom:16px" />
222+
<img src="/images/generating-og-images.png" alt="An example generated OG image from the snippet above" width="618" height="324" loading="lazy" decoding="async" style="margin-bottom:16px;border:1px solid #efefef;" />
223223

224224
Hope this was helpful and that you’ll try it out! It ended up being a lot more straightforward than I expected to get this set up, although to be fair I then spent tons of time tinkering and tweaking the exact setup. If there’s interest for it I might try to set up a library in the style of `NimblePublisher` that covers basic use cases. Let me know!

0 commit comments

Comments
 (0)