Open Graph Preview for Facebook, X, LinkedIn, Slack and Discord
Operator: Abdulla Al Fahad. How tools are built and checked
A share image of 1200 by 800 pixels is a 1.50 to 1 picture, and every platform wants a different shape: Facebook crops it to 1.91 to 1, losing about 21% of its height, X's large card to 2 to 1, losing about 25%, and X's small summary card to a square, losing a third of the width. A text preview of the tags cannot show that. Here the picture is measured and each platform's check says how much would be cut.
Paste the head of a page, or type the fields, and five approximate cards appear. They follow each platform's fallback order: X looks for twitter:title before og:title, and every platform falls back to the page's own title and meta description when the Open Graph tag is missing.
Key features
- Approximate cards for Facebook, X (large and small), LinkedIn, Slack and Discord
- Tags read from a pasted head into editable fields, with the source of each title, description and image shown
- Image size and aspect ratio checked per platform against Facebook, X and LinkedIn guidance, with the crop worked out
- A picked image file measured and previewed on this device; width and height can be copied into the tags
- Missing Open Graph and Twitter tags generated, plus a full tag set, with values escaped for HTML attributes
How each platform picks its title, description and image
The sizes used are Facebook's 1200 by 630 (1.91 to 1) with a 600 by 315 minimum and 8 MB limit, X's 2 to 1 large card (300 by 157 to 4096 by 4096, 5 MB) and 1 to 1 summary card (144 by 144 minimum), and LinkedIn's 1200 by 627 guidance. Slack and Discord publish no size rules, so only the general checks apply; Discord shows a large image when twitter:card is summary_large_image and a small thumbnail otherwise, and its coloured bar comes from the theme-color meta tag. Field checks cover what often goes wrong: no og:image or one that is a relative path, an og:image served over http, no og:url, an og:title over 70 characters or a description over 200, no twitter:card (X then takes the title and image from Open Graph but the card type is not stated), and an invalid card value. Handles entered without @ get one in the generated tags.
How it works
The pasted head is scanned for meta and link tags by a small tokenizer, with no document created and no script run. A meta tag counts if it has the right property or name; tags that carry og: in name instead of property are accepted and noted. Remote image URLs are never loaded, because that would be a request to a third party: the card shows a labelled placeholder with the right proportions until you choose the image file, which is shown from a temporary local URL and released when you remove it or leave the page.
Common use cases
- A blog's template sets only og:title and a 1200 by 800 hero image, and the Facebook check says about 21% of the height will be cut, so the designer exports a 1200 by 630 version.
- A product page is shared in a Slack channel and the preview shows the site name and an image but no description; the checks show that both og:description and the meta description are missing.
- A campaign needs the Discord embed to carry the brand colour, so a theme-color of #5865f2 is entered and the embed's left bar follows it.
How to use this tool
- Paste the page's head and press Read tags into the fields, or type the title, description, image URL and other fields directly.
- Choose the share image file if you want the card to show it and the size and ratio measured.
- Switch between the five platform tabs and read the checks beside each card.
- Copy the missing tags, or the full set, into the page's head.
Example
Head excerpt and a 1200 by 800 image
<meta property="og:title" content="Hand-built blue widgets">
<meta property="og:image" content="https://example.com/img/widgets-og.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="800">
<meta name="description" content="Blue widgets built by hand in small batches, with a two-year repair promise.">
<meta name="twitter:card" content="summary_large_image">Checks
Facebook: the ratio is 1.50:1 against 1.91:1; the card crops to 1.91:1, cutting about 21% of the height.
X large: 1.50:1 against 2:1; cutting about 25% of the height.
X summary: 1.50:1 against 1:1; cutting about 33% of the width.
Description comes from the meta description, because there is no og:description.Tips for best results
- Keep faces and text away from the edges: every card crops toward the centre, and the crop figures in the checks show how much of the edge is at risk. The Social Share Image Generator on this site can export the picture at 1200 by 630.
- Set twitter:card to summary_large_image once and leave the other X tags to fall back to Open Graph, instead of repeating every title and description.
- Enter og:image:width and og:image:height, or use the measured size: Facebook uses them so that the image can be drawn the first time a link is shared.
Common pitfalls
These are approximations. Each platform redraws its cards without notice and trims text by its own rules, so the line-clamped previews show roughly how much fits, not exact cut-offs.
Platforms cache what they fetched when a link was first shared. Fixing the tags may not change an existing share until the platform re-scrapes it; Facebook and LinkedIn publish tools to force that.
The crawlers behind these cards read the HTML the server sends and do not run scripts, so tags added by client-side code will not appear on any of them.
Image size is known only from og:image:width and height tags or from a file you pick; a remote URL is not downloaded, so its true dimensions cannot be checked.
Common errors and how to fix them
- "No og:image, so links shared from this page have no picture"
- Add og:image with an absolute https URL to a PNG or JPEG, or type one in the Image URL field to generate the tag.
- "That file could not be decoded as an image"
- The browser could not read the file as PNG, JPEG, WebP, GIF or AVIF. Export it again from the editing program; SVG is not accepted because many platforms ignore it.
How each card chooses its words and picture
Facebook and LinkedIn use og:title, og:description and og:image, and fall back to the page's title and meta description. X prefers twitter:title, twitter:description and twitter:image and falls back to the Open Graph versions. Slack and Discord read Open Graph first and the Twitter tags second. In every case the card says which tag it used, so a surprising title can be traced to its source.
The text clamps in the previews are line counts, not character counts: two lines of title and one of description for Facebook, one title line and two description lines for X, and two title lines and up to four description lines for Discord. Treat them as the shape of the card rather than a limit to design to.
Generated tags
The generator writes og:type (website unless you set another), og:url, og:title, og:description, og:image with its alt text and size, og:site_name and og:locale, then twitter:card, site, creator and any X-specific overrides, and theme-color. Values are escaped for &, quotes and angle brackets, and line breaks become spaces. Only tags with a value are written, and the Missing tags box leaves out those your pasted head already has.
Frequently asked questions
Why is there a grey box where my picture should be?
Remote image URLs are not loaded, since that would contact another server. Pick the image file with the file area to see it in the card and have it measured.
Why does X show a small card when I set an image?
Without twitter:card set to summary_large_image, X draws the small summary card with a square thumbnail. Set the tag, and use an image close to 2 to 1.
Is 1200 by 630 right for every platform?
It is Facebook's recommendation and close to LinkedIn's 1200 by 627. X's large card wants 2 to 1, so 1200 by 600 is closer there. A 1200 by 630 image loses about 5% of its height on X, which the check treats as close enough.