Build and Launch a Website with AI
AI website link preview missing an image? Fix Open Graph, image access and caching (2026)
Fix missing or outdated sharing images on an AI-built website. Check Open Graph metadata, image accessibility, React and Next.js rendering, then verify the platform preview and cache.

Your AI-built website opens correctly, but sharing its URL produces no image or an old template thumbnail. Check three things in order: metadata returned by the production page, public access to the image, and the platform's cached preview. A large image inside the webpage does not automatically become its sharing image.
This procedure uses a portfolio homepage and was checked against official documentation on November 21, 2026. It aims to provide clear metadata and a fetchable image, followed by a test on the intended platform. Different messaging apps can produce different cards.
| Item | Primary purpose |
|---|---|
| Homepage banner | Content visitors see inside the page |
| Favicon | Small browser or site icon |
Open Graph og:image | Candidate preview image for platforms reading the protocol |
og:title and og:description | Sharing title and description |
The basic Open Graph properties are og:title, og:type, og:image and og:url, placed in the document's <head>. Descriptions and image alt text can be added too. Platforms retain control over presentation and cropping. See the Open Graph protocol.
Copy the production address from your hosting project. If you are unsure which URL is public, use the website publishing guide.
For a static HTML homepage, merge these settings into the existing <head>. Do not create a second head element or leave conflicting template tags. Replace the example domain, text and image with your own.
<head>
<meta charset="utf-8">
<title>Lin's Design Portfolio</title>
<meta name="description" content="Explore interface design, brand work and recent projects.">
<link rel="canonical" href="https://example.com/">
<meta property="og:type" content="website">
<meta property="og:title" content="Lin's Design Portfolio">
<meta property="og:description" content="Explore interface design, brand work and recent projects.">
<meta property="og:url" content="https://example.com/">
<meta property="og:image" content="https://example.com/images/portfolio-share-v2.jpg">
<meta property="og:image:type" content="image/jpeg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="Interface design and brand project previews">
</head>
The canonical link and og:url identify the page; og:image identifies its image. Use a complete public HTTPS image URL, not a local path, localhost, a blob: URL or a temporary download link. Width and height must match the actual file; this example assumes a 1200 × 630 JPEG.
Give individually shareable project pages their own URLs and metadata. Pointing every detail page's og:url to the homepage misidentifies those pages. Check localized URLs as well. See Meta's webmaster guide.
For a React + Vite SPA with one homepage, static metadata can usually go in the root index.html, followed by a new build and deployment. When several client routes share that HTML file, changing tags after React runs does not establish that a preview crawler receives distinct metadata for every route.
For separate project details, use prerendering, server rendering or a supported hosting mechanism that returns the correct metadata for each URL. A homepage HTML fallback does not generate project-specific tags. See the React deployment guide.
For the Next.js App Router, use server-side metadata, generateMetadata or the OG image file conventions. Update the existing mechanism rather than adding duplicate manual tags. Dynamic metadata may stream, with different handling for crawlers that need metadata in the initial HTML. Account for the requesting User-Agent when testing. See Next.js metadata documentation.
An AI coding request can be specific:
Inspect sharing metadata for the homepage and one project detail URL. Keep the framework's existing metadata mechanism. Set each production URL's Open Graph title, description and public image, remove conflicting template tags and avoid a client-only fix. List changed files, actual image dimensions, publishing steps and how to inspect the crawler response.
Prepare a landscape PNG or JPEG with important content away from the edges. Meta recommends at least 1200 × 630 pixels, no more than 8 MB, and an aspect ratio close to 1.91:1 to reduce cropping. These are Meta's guidelines, rather than universal requirements. See its image documentation.
Upload the image to a stable static directory or object store. Open the complete og:image URL while signed out. It must return an actual image, not a login screen, file-sharing preview or HTML error. A .jpg filename alone is not proof of the response format.
| Result | Check |
|---|---|
| 404 | Upload path and filename capitalization |
| 401, 403 or challenge page | Permissions, hotlink rules and crawler access |
200 with text/html | An SPA fallback serving the homepage for a missing image |
| Works only after login | Dependence on visitor cookies |
| Stops working later | Expiring image URL |
Adjust access only for content intended to be public.
Use View Page Source on the production URL and search for og:image. The developer tools Elements panel shows the processed DOM; tags there alone do not prove they were present in the initial response.
You can also save a request using a sharing crawler's User-Agent:
curl -sS -L --compressed --max-time 20 \
-A 'facebookexternalhit/1.1' \
'https://example.com/' -o page.html
Replace the URL with the exact page being shared. Open page.html and inspect og:title, og:url and og:image. This request does not execute JavaScript. In Windows PowerShell, use curl.exe to call the curl utility.
The User-Agent test helps compare responses but does not prove the real platform fetched them successfully. Its network origin, access controls and cache can differ. See Meta's crawler documentation.
First confirm the production HTML references the new image. Then open that image anonymously. If its content changed, use a new filename such as portfolio-share-v3.jpg and update the page reference. Finally inspect the page URL using the destination platform's tool.
For Facebook use Sharing Debugger; for LinkedIn use Post Inspector. Follow any sign-in prompts, inspect the fetched metadata and check the preview in the intended sharing interface.
Meta caches images by their URL and instructs publishers to use a new image URL for a replacement. Keep older files that existing shares may reference. LinkedIn explains that refreshed previews affect new shares; existing posts retain their old previews. See Meta image updates and LinkedIn's refresh instructions.
Keep the page's canonical URL and og:url stable instead of changing them repeatedly to work around a stale image.
Before sharing, check the homepage and one detail page: correct metadata for each URL, anonymously accessible images, and the expected preview on the target platform. Verify other apps separately. If the live page itself remains outdated, resolve the deployment or cache problem before diagnosing social preview caching.