Twitter Card Image Not Showing: Test the Image URL Before You Post

Twitter Card Image Not Showing: Test the Image URL Before You Post

Fix a missing Twitter/X Card image by checking its real HTTP status, final URL, MIME type, dimensions, aspect ratio, file size, HTTPS, and hotlink access.

约 5 分钟阅读

Why the image can fail when the page metadata is correct

A valid twitter:image or og:image tag is only a pointer. X must still be able to request the final asset as a public image. Common failures include an image URL that returns 403, a CDN hotlink rule, an HTML error page with a 200 status, a relative URL, a non-HTTPS URL, a redirect chain, or an asset that exceeds platform-friendly limits.

Use a crawler-focused image checklist

Run the page through the validator and read the image diagnostics rather than relying on the image shown in your own browser. The result reports the HTTP status X-style fetches receive, the final asset URL after redirects, MIME type, pixel dimensions, aspect ratio, file size, HTTPS state, and whether access appears blocked.

DiagnosticHealthy resultTypical repair
HTTP status200Publish the asset or remove authentication and hotlink blocking.
Content typeimage/*Point the tag at the image file, not an HTML image page.
URLAbsolute HTTPS URLUse a complete public URL in twitter:image and og:image.
Large card ratioAbout 1.91:1Export a wide social image, such as 1200 × 630 px.
File sizeComfortably below 5 MBCompress or re-export the image without changing its public URL path unexpectedly.

Use one image source while you diagnose

Set twitter:image and og:image to the same public image URL until the preview is stable. Once the card is rendering reliably, use a dedicated Twitter image only when there is a deliberate creative difference. If you replace the bytes at the same URL and X continues to show an old image, use a versioned image URL and check the cache guide.

<meta name="twitter:image" content="https://your-domain.com/images/social-card-v2.jpg" />
<meta property="og:image" content="https://your-domain.com/images/social-card-v2.jpg" />

常见问题

Twitter Card Image Not Showing: Test the Image URL Before You Post 主要解决什么问题?+
Fix a missing Twitter/X Card image by checking its real HTTP status, final URL, MIME type, dimensions, aspect ratio, file size, HTTPS, and hotlink access.
Twitter Card Image Not Showing: Test the Image URL Before You Post 的核心要点是什么?+
A valid twitter:image or og:image tag is only a pointer. X must still be able to request the final asset as a public image. Common failures include an image URL that returns 403, a CDN hotlink rule, an HTML error page with a 200 status, a relative URL, a non-HTTPS URL, a redirect chain, or an asset that exceeds platform-friendly limits.