【问题标题】:How do you give a thumbnail to other websites? [duplicate]您如何将缩略图提供给其他网站? [复制]
【发布时间】:2017-09-11 00:01:29
【问题描述】:

当用户在 Reddit 或 Facebook 或类似网站上发布来自网站的链接时,他们通常会有一张与之相关联的图片。

是否有规定该图像在 html 文件的标题中的内容?我想一定有一个元标签,类似于描述和作者,允许这个被口述?

我已经在 Stack Overflow 上搜索过类似的问题和一般的互联网,但找不到任何东西,这让我怀疑我的问题是不是用错了措辞。

【问题讨论】:

  • 您可能指的是 og:image 元属性。只需谷歌搜索,看看它是否符合您的问题

标签: html meta-tags meta


【解决方案1】:

如果我正确理解您的问题,您在发布指向您网站的链接时尝试显示某个图像,请尝试以下操作:

<meta property="og:image" content="url to specific image you want" />
<meta property="og:title" content="name of page" />
<meta property="og:description" content="description of content" />

此外,您可以在此 Facebook 调试网站上解决此类问题:

http://developers.facebook.com/tools/debug

希望这会有所帮助,祝你好运。

【讨论】:

    猜你喜欢
    • 2015-12-13
    • 2011-06-17
    • 1970-01-01
    • 2018-05-02
    • 2011-03-24
    • 2011-06-02
    • 2023-03-31
    • 2015-02-08
    • 1970-01-01
    相关资源
    最近更新 更多