Menu

Link preview shows no image? 7 og:image checks for Slack, X, Discord and LinkedIn
📰

Link preview shows no image? 7 og:image checks for Slack, X, Discord and LinkedIn

DEV Community: html·Bharat Ankh·11 days ago
#SNBAWil4
#devto2#devto#dev#crawler#article
Reading 0:00
15s threshold

Your page looks fine in the browser, but when you paste the URL into Slack, X, Discord or LinkedIn you get a title and maybe a description, with no image . The crawler usually isn't broken. It's almost always one of these.

1. The tags only exist after JavaScript runs

Link-preview crawlers read the raw HTML the server returns. Most don't execute JavaScript. If your og: tags are injected by React/Vue on the client (a plain SPA, or react-helmet without SSR), the crawler never sees them.

Check what the crawler sees:

curl -s https://yoursite.com/page | grep -i 'og:image'

Enter fullscreen mode

Exit fullscreen mode

If that prints nothing, render the tags on the server (SSR/SSG, or your framework's metadata API).

2. og:image is a relative URL

Use an absolute URL with the scheme:

<meta property= "og:image" content= "https://yoursite.com/og/page.png" >

Enter fullscreen mode

Exit fullscreen mode

/og/page.png or //cdn... is a common reason for "title but no image".

3.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.