Guides
Sign in

Guide · Google and AI tools

Link preview not showing? Fix og:image on Lovable and other AI-built apps

When you paste your app’s link into WhatsApp, X, LinkedIn or Slack, the card comes from a few tags in your page’s HTML. If they’re missing, added only by JavaScript, still pointing at someone else’s image, or the image is too big, the card shows no image or the wrong one. And once a platform has kept a copy of your card, fixing the tags isn’t enough on its own. You have to ask it to look again.

The tags a preview reads

Platforms build the card from Open Graph tags in your page’s <head>. The Open Graph protocol names four that every page needs: og:title, og:type, og:image and og:url (ogp.me). LinkedIn lists og:title, og:image, og:description and og:url as “the og: tags that must exist” (LinkedIn Help). X reads its own twitter: tags and falls back to the Open Graph ones, but without twitter:card its docs say “a summary card may be rendered”, the small one (X’s docs, archived). Ask for the large image with summary_large_image.

The tags, with your own words and addresses

<meta property="og:title" content="Tidy Tasks: shared to-do lists for small teams">
<meta property="og:description" content="Share lists, assign tasks and get a reminder before anything is due.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://example.com/">
<meta property="og:image" content="https://example.com/share.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="The Tidy Tasks list screen">
<meta name="twitter:card" content="summary_large_image">

Use full addresses that start with https://, as the protocol’s own examples do. Open Graph asks for og:image:alt whenever there’s an image: “A description of what is in the image (not a caption)” (ogp.me).

Why JavaScript can leave the wrong card

Preview bots read the HTML your server sends, and stop there. “Social platforms such as LinkedIn, Slack, Facebook, X, and WhatsApp read the Open Graph tags in your page's HTML. Most of them do not run JavaScript” (Lovable’s docs).

Many AI-built apps are single-page apps: the server sends the same index.html for every address. JavaScript then draws the page, and sometimes sets the tags. People never notice, as their browser runs it. But a preview bot sees only what’s in index.html: the starter template’s tags, an old image, or none at all.

  • One card for the whole app: put the tags in index.html itself in a Vite app, or in the layout file in Next.js, so they’re in the HTML before any JavaScript runs.
  • A different card for each page: those pages have to arrive as real HTML, pre-rendered or rendered on the server. Why AI assistants get a blank page covers how, and the same fix helps both.
  • Let the bots in: X’s docs list “a robots.txt file that is blocking the crawler from getting your Card metadata” as a cause of a missing card (X’s docs, archived), and Facebook asks that your page can be read “within a few seconds” (Meta’s docs).

On Lovable

Lovable handles the JavaScript part for you: “Lovable apps serve those tags to social-preview bots, but each page still needs its own Open Graph tags” (Lovable’s docs). Apps made from 13 May 2026 render on the server. Older ones are pre-rendered for verified crawlers, and Lovable counts social-preview bots among them. So on Lovable, a missing or wrong image usually comes from one of these:

Lovable’s image is still thereIf your og:image points at an image on lovable.dev, every share shows Lovable’s picture, not your app. Lovable’s own SEO review can flag it as “Shared links still show Lovable's branding”.Worth fixing
Your site isn’t publicLovable uses “an image you've asked it to set, or the latest screenshot of your app”, and “Sites that aren't publicly visible don't get an automatic social sharing image” (Lovable’s docs).Check yourself
You changed it but didn’t publishLovable says “a metadata change reaches your live site on the next publish” (Lovable’s docs).Check yourself

To change the image, Lovable’s docs say to ask in the project chat, for example to “generate a new social sharing image”. They also say a page can have its own. Before you publish, open the page selector above the preview: “The Social card shows the exact title, description, and image that social platforms read” (Lovable’s docs). Then publish, and refresh the old preview as below.

The image itself

  • Size: 1200×630 pixels. Lovable’s advice: “Keep share images at 1200×630 and a few hundred KB. WhatsApp shows no preview for larger files” (Lovable’s docs). LinkedIn asks for at least 1200×627 and a 1.91:1 ratio, at most 5 MB, and “Images less than 401 pixels wide display as a thumbnail image” (LinkedIn Help).
  • Format: PNG or JPG. X takes JPG, PNG, WEBP and GIF, and says “SVG is not supported” (X’s docs, archived).
  • Reachable by anyone: the image has to load without signing in. X calls an image that “is not publicly accessible on the web” the most common cause of a missing one (X’s docs, archived).
  • Width and height tags: Facebook asks for them “to ensure that the image loads properly the first time it's shared” (Meta’s docs).

Refresh a preview that’s stuck

Platforms keep a copy of each card. Fixing your tags changes what they find the next time they look, not the copy they already have. Publish your fix first, then:

  • Facebook: paste your address into Meta’s Sharing Debugger. “The debugger also triggers a scrape of your page” (Meta’s docs).
  • LinkedIn: enter your address in Post Inspector and check the preview. It only fixes new posts: “The preview for any existing posts with this URL will remain the same” (LinkedIn Help).
  • X: its current docs name no refresh tool. The archived ones say X “re-indexes the meta information on your tag roughly every seven days” (X’s docs, archived).
  • WhatsApp and Slack: we found no page from either that says how to refresh a preview, so we don’t name a tool. Slack’s docs say it “looks for common OpenGraph and X (formerly known as Twitter) Card metadata” (Slack’s docs).
  • A new image needs a new address. “Images are cached based on the URL and won't be updated unless the URL changes” (Meta’s docs), and X caches them the same way. Give the new image a new file name, like share-2.png, and update og:image to match.

A ready-made fix prompt for this is part of Pro, coming soon. Every problem and what we found stays free.

What this can’t tell you

We read the HTML of the address you check, the way it arrives, before any JavaScript runs, and look for og:title and og:image. We don’t download the image, so we can’t tell its size or whether it loads. We also don’t read your other pages or your twitter:card tag. A share image served from lovable.dev shows up in your report as a starter leftover. On an older Lovable app, preview bots get a pre-rendered copy that we can’t see. To see what a platform gets, use its own tool above.

Related

Sources