From f479a4eefef4ed57cc19fec1da52e920039860d8 Mon Sep 17 00:00:00 2001 From: Dan Gold Date: Fri, 18 Sep 2026 08:37:09 -0700 Subject: [PATCH] og: drop the og:image sub-properties so Slack renders the card Slack resolved the page but never showed the image. Every other explanation is ruled out by three pages whose links do unfurl -- sentry.io/welcome/, blog.sentry.io, and an external control: tag completeness ours was a strict superset of all three charset position sentry.io declares it after the whole og block comment style blog.sentry.io uses the same short labels name= vs property= on the twitter tags, both appear and both work PNG vs webp the external control is a PNG image size blog.sentry.io ships 178KB cache-control blog.sentry.io sends max-age=0, must-revalidate unfurl cache a URL Slack had never seen also came back bare None of those three declares og:image:width, :height, :type, :secure_url or :alt. This page was the only one that did, which left it as the sole remaining difference. The head is now the same shape as blog.sentry.io's, and 2197 bytes rather than 2751. twitter:image:alt goes with them. The alt text is a real loss for screen reader users, but an image Slack will not render has no alt text either; it can come back once the card is showing. --- index.html | 6 ------ tools/README.md | 27 +++++++++++++++++++-------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index afc7584..2baca08 100644 --- a/index.html +++ b/index.html @@ -12,18 +12,12 @@ - - - - - - Sentry Live diff --git a/tools/README.md b/tools/README.md index 9b86487..42ec1bf 100644 --- a/tools/README.md +++ b/tools/README.md @@ -49,14 +49,25 @@ exists so this repo can write image files without taking on a dependency. ## A note on the social tags -`index.html` keeps every `og:` and `twitter:` tag on a single line, in one -contiguous block near the top of ``, with only short comments around them. -That is deliberate. Slackbot reads just the first 32KB of a document, not every -scraper parses HTML properly, and `og:image:alt` is a sub-property of -`og:image` — a tag wrapped across lines, or a stray property interrupting the -image group, is the sort of thing a line-oriented parser drops the image over. -An HTML comment also may not contain a double hyphen, so keep the prose here -rather than in the head. +`index.html` carries the smallest tag set that does the job: `og:type`, +`og:site_name`, `og:url`, `og:title`, `og:description`, `og:locale`, a single +`og:image`, and four `twitter:` tags. Each is on one line, in one contiguous +block near the top of ``, with only short comments around them. Slackbot +reads just the first 32KB of a document, not every scraper parses HTML properly, +and an HTML comment may not contain a double hyphen — so keep prose here rather +than in the head. + +There used to be five more: `og:image:secure_url`, `og:image:type`, +`og:image:width`, `og:image:height`, `og:image:alt`, plus `twitter:image:alt`. +They are gone because Slack would not render the card while they were present. +Everything else had been ruled out by comparing against three Sentry pages whose +links do unfurl — sentry.io/welcome/, blog.sentry.io and an external control: +tag completeness (ours was a superset), charset position, comment style, +`name=` vs `property=` on the twitter tags, PNG vs webp, image size, +`cache-control`, and Slack's own per-URL unfurl cache. The sub-property block +was the only axis on which this page differed from all three. Adding any of them +back is a live experiment, not a tidy-up — do it one at a time and check Slack +on a URL it has not seen before. ## The social card