Repository navigation
og: drop the og:image sub-properties so Slack renders the card - #38
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slack resolves the page and shows the title and description, but never the image. Facebook, LinkedIn and opengraph.xyz all render it.
What this changes
Six tags deleted from
index.html:Before — 12 og/twitter tags, head 2751 bytes
After — 11 og/twitter tags, head 2197 bytes
The remaining set is
og:type,og:site_name,og:url,og:title,og:description,og:locale,og:image, and fourtwitter:tags.Why
Three pages whose links unfurl in Slack were used as controls:
sentry.io/welcome/,blog.sentry.io, and an external site. Between them they rule out every other theory:<meta charset>after the whole og block, ~4KB in<!-- Open Graph -->labels we doname=vsproperty=on twitter tagscache-controlmax-age=0, must-revalidate— effectively uncachedsentry.iounfurlsThe image itself was also checked and is sound: valid signature, every chunk CRC correct,
IHDR 1200x630 depth=8 colourtype=6, not interlaced, 200 toSlack-ImgProxy.That left exactly one difference. None of the three controls declares any
og:imagesub-property. This page was the only one that did.Tradeoff
og:image:altandtwitter:image:altcarried real alt text for screen reader users. That is a genuine loss. But an image Slack will not render has no alt text either — the tags can come back one at a time, each verified against a URL Slack has not seen, once the card is showing.Not proven
This is the last remaining difference, not a demonstrated mechanism. If the card still does not appear after deploy, the cause is outside the markup and the next thing to look at is the image response, which is unusually bare next to the controls — no
cache-control, noetag, noaccess-control-allow-origin. That is nginx config, not this repo.tools/README.mdrecords all of the above so the next person does not re-run the elimination.