[英]Set image that shows up when my web page is linked
When you paste a link on something like Facebook or Discord, there's this image that shows below it.当您将链接粘贴到 Facebook 或 Discord 之类的内容时,会在其下方显示此图像。 For example, if I link something from the Google Play Store to discord, the image I set in the play console as "Feature Graphic" shows up.例如,如果我将 Google Play 商店中的某些内容链接到 discord,则会显示我在游戏控制台中设置为“Feature Graphic”的图像。 How can I set this image on any HTML page?如何在任何 HTML 页面上设置此图像?
I know I can set a favicon like this:我知道我可以设置这样的图标:
<link rel="icon" href="favicon.png">
Can I do something similar for what I described?我可以为我所描述的做一些类似的事情吗?
You'll want to set the link preview meta tags as follows:您需要按如下方式设置链接预览元标记:
<meta property="og:title" content="Example Page">
<meta property="og:image" content="https://example.com/images/image.jpg">
<meta property="og:description" content="This is just an example page.">
<meta property="og:url" content="https://example.com/page.html">
<meta name="twitter:card" content="summary_large_image">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.