iMessage Rich Link Preview Guide
Apple Messages creates rich link previews for URLs shared in chats. The rules are strict: metadata must be in the source HTML and JavaScript is never executed.
Preview with iMessage →Important: JavaScript is not executed
Apple explicitly states that JavaScript does not run when creating rich links. All metadata must be present in the server-rendered HTML source.
Tags Apple reads
| Tag | Used as | Priority |
|---|---|---|
| og:title | Rich link title | Required |
| og:image | Preview thumbnail | Strongly recommended |
| rel="icon" | Site icon shown in the preview | Recommended |
| og:video | Video preview | Optional |
Best practices
- → Use unique, informative titles (Apple recommends avoiding generic titles like "Home" or "Welcome").
- → Avoid text in images, the same rich link can appear at very different sizes across devices.
- → Keep the total media size under 10 MB (icon + image + video combined).
- → Use server-side rendering (JavaScript is never executed by Apple's crawler).
Recommended HTML
<link rel="icon" href="/favicon.svg" type="image/svg+xml" /> <meta property="og:title" content="My Unique Page Title" /> <meta property="og:image" content="https://example.com/og.jpg" /> <meta property="og:url" content="https://example.com/my-post" />
Frequently asked questions
- What metadata does iMessage use for rich link previews?
- Apple Messages uses og:title (required), og:image (strongly recommended), and the site's rel="icon" for the icon displayed in the preview. All metadata must be present in server-rendered HTML.
- Does iMessage run JavaScript when generating rich link previews?
- No. Apple explicitly states that JavaScript is never executed during rich link generation. All metadata must be present in the server-rendered HTML source (frameworks that inject tags via client-side JS will not work).
- Why does my iMessage link preview not show an image?
- Common causes: the og:image tag is missing, the image URL is not publicly accessible, the total media size (icon + image) exceeds 10 MB, or the metadata is injected via JavaScript rather than server-rendered HTML.
- How can I preview my iMessage rich link before sharing?
- Paste your URL into peek to see exactly how your link will appear as a rich preview in Apple Messages (including the image thumbnail, title, and favicon).