What you are seeing: Your card renders on Facebook but the image is blank on X, or the image appears for some people and not others.
Why the protocol matters here
Preview cards are rendered inside pages that are themselves served over HTTPS. Pulling an image over plain HTTP into an HTTPS page is mixed content, and browsers block it. X does not attempt the request at all — a non-HTTPS og:image is simply treated as no image.
Other platforms are less strict but not reliable. Facebook will often fetch an HTTP image and re-host it, so the card looks fine there while being broken on X. That inconsistency is what makes this hard to spot: the preview works in whichever debugger you happened to check first.
The fix is usually one character
If your image host already serves HTTPS — and almost every host and CDN does — change http:// to https:// in the tag and you are done. Confirm the HTTPS URL actually loads in a browser first, since some older setups have a certificate that only covers the apex domain and not the subdomain the images sit on.
When you cannot move the image
The Open Graph spec provides og:image:secure_url for exactly this case. Leave og:image pointing at the HTTP URL for older consumers and add og:image:secure_url with the HTTPS equivalent alongside it. Platforms that require HTTPS use the secure variant.
Treat this as a stopgap. If the image genuinely has no HTTPS URL, the practical fix is to move it to a host that provides one rather than to maintain two tags indefinitely.
Prefer a single HTTPS URL
<meta property="og:image" content="https://example.com/og.png" />
<!-- Only if the image cannot move off HTTP -->
<meta property="og:image" content="http://example.com/og.png" />
<meta property="og:image:secure_url" content="https://example.com/og.png" />Frequently asked
My site is HTTP-only. Does that change anything?
No. The requirement is on the image URL, not your page, because the card is rendered inside the platform's own HTTPS interface. An HTTP image will still be blocked on X even if your page is HTTP too.
Does a protocol-relative URL like //example.com/og.png work?
No. Crawlers read the tag out of raw HTML without a page context to resolve against, so og:image needs a fully absolute URL including the scheme. Protocol-relative URLs are treated as invalid.
Fix it with AI
Paste this into Claude Code, Cursor, Copilot or another coding agent, from your project's folder.
Fix this social preview problem in this project. Problem: og:image is served over HTTP Tag: og:image What people see: Your card renders on Facebook but the image is blank on X, or the image appears for some people and not others. Background: Your `og:image` URL starts with `http://` rather than `https://`. X refuses these outright and other platforms treat them inconsistently. Here is how to fix it. How to work: 1. Find where this project sets each page's `<head>` metadata — the framework's metadata API, a layout or head component, a page template, or an SEO plugin — and fix it there so every page type gets it, not just one page. 2. Use the page's real content for titles, descriptions and alt text. Don't invent claims, prices or names. 3. Every URL in a meta tag (`og:image`, `og:url`, `twitter:image`) must be absolute and start with `https://`. 4. If an image needs to be made, resized or compressed, tell me exactly what's needed instead of pointing a tag at a file that doesn't exist. 5. Don't change tags or code unrelated to these problems. 6. When you're done, list each change and the problem it fixes, and anything I still need to do by hand. Full guide (read it first if you can open web pages): https://ogimage.info/learn/og-image-not-https?utm_source=fix-prompt&utm_medium=ai&utm_campaign=guide When you're done, tell me I can check the result either way: - On my local dev server, with the Open Graph Debugger Chrome extension: https://chromewebstore.google.com/detail/open-graph-debugger/bepabeobdmmefhhhkonppcppgodhjdno?utm_source=fix-prompt&utm_medium=ai&utm_campaign=guide - On the live page, once deployed: https://ogimage.info/?utm_source=fix-prompt&utm_medium=ai&utm_campaign=guide
Check your page
Run your URL through the checker to confirm the fix is live and see how the card renders on every platform.
Test a URLNeed a new image? Create one with the free OG image generator.