问HN:你会使用一个通过一个元标签生成OG图片的服务吗?

1作者: shafkathullah大约 1 个月前原帖
大多数网站并不为每个页面(如博客文章、产品页面、文档等)设置 Open Graph 图片,这导致在 Twitter、LinkedIn 和 Slack 上的预览内容显得乏味或无法显示。 我一直在尝试一个托管服务,只需添加一个类似于以下的 meta 标签: ```html <meta property="og:image" content="https://uselinkshot.com/acc_123/tmp_456?url=https://yoursite.com/page" /> ``` 当有人分享你的页面时,OG 图片会动态生成(通过浏览器渲染),并使用 stale-while-revalidate 进行缓存,从而快速提供服务。你可以设置模板以确保品牌形象、标题等的一致性。 这样可以避免: - 为每个页面手动设计图片 - 自行搭建 Puppeteer/Playwright 环境 - 为一个本质上小但重要的细节添加繁重的基础设施 我想问问 HN 的朋友们: - 这是否是你们遇到的一个痛点? - 你们会信任第三方服务来处理 OG 图片,还是更倾向于自己开发? - 什么样的功能会让这个服务足够有用以至于值得采用(API 访问、缓存失效、更多控制、定价等)? 我很想知道这是否解决了一个真正的问题,还是仅仅是一个“锦上添花”的功能。
查看原文
Most sites don’t bother with Open Graph images for every page (blog posts, product pages, docs, etc.), which leads to boring or broken previews on Twitter&#x2F;LinkedIn&#x2F;Slack.<p>I’ve been experimenting with a hosted service where you add just one meta tag like:<p>&lt;meta property=&quot;og:image&quot; content=&quot;https:&#x2F;&#x2F;uselinkshot.com&#x2F;acc_123&#x2F;tmp_456?url=https:&#x2F;&#x2F;yoursite.com&#x2F;page&quot; &#x2F;&gt;<p>When someone shares your page, the OG image is generated dynamically (via browser rendering), cached with stale-while-revalidate, and served quickly. You can set up templates for consistent branding, titles, etc.<p>This avoids:<p>Manually designing images for each page<p>Running your own Puppeteer&#x2F;Playwright setup<p>Adding heavy infra for what’s essentially a small but important detail<p>My questions for HN:<p>Is this actually a pain point you’ve run into?<p>Would you trust a third-party service for OG images, or prefer rolling your own?<p>What would make this useful enough to adopt (API access, cache-busting, more control, pricing)?<p>I’d love to hear whether this scratches a real itch or is just a “nice-to-have.”