简体   繁体   中英

How does wechat choose the link's thumbnail?

I have an issue very similar to this issue , and the accepted answer is outdated.

Currently, when users share a link to my website, 3 cases happen:

  • there is no image (default grey icon)
  • there is an image that is not the intended one
  • there is the intended image (the main article image, also referred in the meta using open graph)

What's more, different users, on the same network, sharing the same article, experience different results.

How does wechat identify which image to use as a thumbnail when sharing a link? How can one achieve a consistent behavior?

You have to have a Wechat platform account and use the jssdk provided.

English documentation for jssdk is available here: http://admin.wechat.com/wiki/index.php?title=JS_SDK_DOCUMENT

If you are not using the WeChat JS SDK, then WeChat seems to use whatever value you have set in your meta tag for og:image

<meta property="og:image", content: "http://example.com/path/to/image.jpg">

If you would like to further modify whatever settings are provided for sharing a link in the WeChat moments or in-message settings, you'd have to take a look at the SDK.

Please note that the title that accompanies that image should be set in the following meta tag:

<meta property="og:title", content: "Title of your page">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM