The last few days I have been trying to figure out why Telegram and Viber do not display the og:image from the canonical url of the site. If I insert a link in the messenger with any get parameter, like https://example.com/?t=2 everything will work. Without it – no. This occurs only in Telegram and Viber, Instagram and Facebook always display an image, regardless of the type of link.
Here is my metatags setup:
<meta property="og:image" content="{my_png_image_direct_url}" />
<meta property="og:image:secure_url" content="{my_png_image_direct_url}" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="968" />
<meta property="og:image:height" content="504" />
<meta property="og:title" content="..." />
<meta property="og:site_name" content="...." />
<meta property="og:url" content="..." />
<meta property="og:type" content="website" />
<meta property="og:description" content="..." />
<meta property="og:locale" content="uk_UA" />
2
Answers
If I understand, Viber does not support the
http
protocol for Open Graph images. Onlyhttps
.📖 Explanation
If you change the domain or something else regarding DNS on where the preview image is hosted, Telegram might have cached the link which is used for displaying the preview of your site.
This causes the image to not load in correctly. I guess Telegram then tries to load the image from the old URL.
🧑💻 Solution
You can use Telegram’s @webpagebot to update the link preview of your site. Just start the chat and send it the link to your website.
The image should now be displayed correctly! 🎉