问答
Why does my OG image not show up on shares?
A card with no image is almost always one of a few causes: a relative path, a stale cache, a blocked file or a rewritten head.
更新于 2026年2月17日 · 约 3 分钟
You shipped an og:image, the file opens fine in your browser, and the card still comes back as text. There are six or seven causes, and they cluster around the same three things: the URL, the file, and what the crawler is actually served.
The checklist
| Symptom | Likely cause | Fix |
|---|---|---|
| Text-only card, no image at all | og:image uses a relative path | Use an absolute HTTPS URL |
| Works in one tool, blank in Facebook | Crawler cache | Force a re-scrape in the platform debugger |
| Image broken or blank | Wrong Content-Type, hotlink protection, or a login wall | Serve image/png or image/jpeg publicly |
| Small square thumbnail | Image below the minimum, or no twitter:card | Ship 1200×630 and summary_large_image |
| Correct in staging, wrong in production | Framework or CDN rewrites the head | Verify the live, crawler-served HTML |
| Image blocked during scrape | robots.txt disallows the image path | Allow the image directory |
| Ratio wrong on the first share, fine later | Missing og:image:width and height | Add both tags |
Walk them in order; the first one that fails is your answer.
1. Is the URL absolute?
<!-- fails -->
<meta property="og:image" content="/og/launch.png">
<!-- works -->
<meta property="og:image" content="https://example.com/og/launch.png">
Crawlers do not resolve relative URLs against the page, and an http:// image on an https:// page is mixed content to some consumers. Absolute, HTTPS, stable.
2. Does the file load for a stranger?
Open the image in a private window with no cookies. If it only loads when you are signed in, the crawler gets a 401 or 403 and skips it. Check the response directly:
curl -sI https://example.com/og/launch.png \
| grep -iE '^(HTTP|content-type|content-length)'
You want a 200, a content-type of image/png or image/jpeg, and a reasonable length. A text/html content type on a .png URL almost always means your framework served an error page instead of the image.
3. Is the image big enough?
Minimums differ per platform, but the practical floor is 1200×630. Below roughly 600×315, Facebook may render a small thumbnail or nothing at all. Declare the dimensions so the first scrape gets the ratio right:
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="twitter:card" content="summary_large_image">
Without twitter:card, X shows a small square even when the image itself is wide.
4. Is it a cache problem?
Every platform caches the scrape. Change the tags and the card can keep showing the old version until you force a refresh. Use Facebook’s Sharing Debugger, LinkedIn’s Post Inspector or X’s Card Validator and trigger the re-fetch. To see what the crawler is being served right now, fetch the page with a crawler user agent:
curl -sL --compressed \
-A "facebookexternalhit/1.1" \
https://example.com/page | grep -iE 'og:|twitter:'
5. Is the file too heavy?
Some consumers skip an image above a few megabytes rather than downscale it. A 2000×2000 PNG exported straight from a design tool is a common culprit. Export at 1200×630 and keep the file comfortably under 1 MB.
6. Is something rewriting your head?
A framework, a tag manager or a CDN can reinject a default image over yours, or minify the HTML in a way that drops tags. The check is the same as step 4: compare the source you wrote with the HTML that comes back.
Common mistakes
Testing only in the browser. Your browser does not run the crawler. If you did not fetch the page with a crawler user agent, you have not tested the thing that matters.
Assuming a fix applied instantly. After editing tags, re-scrape in each platform’s debugger before drawing a conclusion.
Pointing at a CMS-managed image with a temporary URL. Signed URLs expire, and the card reverts to text-only. Host share images at a permanent path.
Forgetting twitter:image precedence. If twitter:image exists but is broken, X will not fall back to og:image. Either fix it or remove it.
Leaving out og:image:alt. It is read aloud on some surfaces and costs nothing to add.
Shipping a redirect on the image URL. Some crawlers will not follow it. The image URL should respond with a 200 directly.
Where this tool fits
The meta preview debugger fetches a URL once and shows the card each platform would render, next to every missing or malformed tag. Use it to find the fault quickly, then confirm in the platform’s own debugger and re-scrape before you consider it fixed.
Frequently asked questions
▸ Why does Facebook show no image when my page looks fine?
Either the og:image path is relative, the file is not publicly reachable, or Facebook cached an earlier scrape. Use an absolute HTTPS URL, check the file loads in a private window, then force a re-scrape.
▸ Why is my card a small square instead of a wide one?
Usually the image is below the platform minimum, or twitter:card is not set to summary_large_image. Ship at least 1200×630 and add the twitter:card tag.
▸ Why does the image show in one tool but not another?
Each platform caches its own scrape and applies its own minimums. A card can pass one check and fail another. Compare the source HTML with a crawler user agent, then re-scrape each platform separately.
▸ Does og:image need to be an absolute URL?
Yes. Crawlers do not resolve relative paths against your page, so content="/og.png" usually fails while a full HTTPS URL works.
▸ Why did the image work once and then disappear?
A signed or expiring URL is the usual cause. Share images should live at a permanent path; once a temporary URL expires, the crawler gets an error and drops back to a text-only card.