【问题标题】:How to dynamically generate an Image to be used as the Meta og:image url?如何动态生成用作 Meta og:image url 的图像?
【发布时间】:2018-03-20 00:14:46
【问题描述】:

我有兴趣学习如何动态生成 og:image。以网站 Molly 和 Michael Seibel 的个人资料页面为例。

他的个人资料页面:https://molly.com/michael

他的页面有一个独特的元 og:image,这使得通过 iMessage、FB、Twitter、LinkedIn 等中的链接预览共享此页面更加友好...

<meta content="https://s3-us-west-2.amazonaws.com/molly-assets-prod/michael-card.png" property="og:image">

我的应用使用 Node.js、KOA、React 构建并托管在 heroku 上,如何为每个用户的个人资料页面动态生成唯一的 og:image,其中我有他们的姓名和照片?

【问题讨论】:

    标签: node.js reactjs image-processing heroku koa


    【解决方案1】:

    你可以使用 react-helmet:https://github.com/nfl/react-helmet

    【讨论】:

    • 谢谢,但这需要服务器端渲染 og 标签,它创建的反应应用程序不支持。
    • react-helmet 不显示og:image 中的图像
    猜你喜欢
    • 1970-01-01
    • 2017-11-17
    • 2020-02-21
    • 2015-09-15
    • 1970-01-01
    • 2011-12-21
    • 2012-05-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多