14 hours ago · Tech · 0 comments

Open Graph images are the bane of my existence.↗ Seeing a beautiful one in a link preview in iMessage or Discord is just a chef’s kiss. But for whatever reason, generating them has nearly destroyed me. Last June, nearly a full year ago, I spent 4 hours on stream designing and coding up some super fancy solution using Cloudflare Workers. I thought I’d be super smart and cool and use an SVG to do it since an SVG is technically an “image” and of course og:image supports SVG, right??? Wrong! I honestly don’t even know what formats are supported, but I know for sure SVG is not. Play Video: Add dynamic og:images to my blog with Cloudflare Workers A Critical Hit!┅ The Backstory The “Open Graph protocol” ( wiki↗ ) is some random crap that Facebook cooked up back in 2010 to make web content shared on Facebook look better. It’s not an official specification and how applications use it is pretty much just random. At its core, it’s just a bunch of special <meta>↗ tags. However, as of the Year of…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.