Preview checker: a page that only has `og:image:url` is reported as having no image
メンテナーはふだん 2 日以内に返信
@MugdhoAI がすでに取り組んでいます。
2026年12月4日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 88/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- web-dev
調査の方向性
まず src/lib/meta-fetcher.ts の parseMetaTags から始め、次に resolveUrl と tests/lib/meta-fetcher.test.ts の既存のケースを確認します。対象のテストファイルを実行し、npm run dev を /preview と 함께使用して、画像がないという報告を再現します。og:image:url が指定どおりに処理され、既存の動作が変更されず、npm run check、npm run test、npm run build がすべて成功すれば完了とします。
索引モデルが issue の本文から書いたものです。
説明
parseMetaTags only takes the image from og:image (src/lib/meta-fetcher.ts lines 72 and 89). The Open Graph docs define og:image:url as identical to og:image, so a page can use it as its only image tag:
<meta property="og:image:url" content="/card.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
The checker doesn't see an image there, and it drops the width and height too, since they only count after an og:image. I ran parseMetaTags and analyzeMeta on a page where everything else is set, once with each tag:
og:image → https://example.com/card.png, 1200 wide, score 100 (A)
og:image:url → no image, no width, score 70 (C)
"Missing og:image tag ..."
"No twitter:image or og:image ..."
The platform previews use the same value, so they have no Open Graph image to show for that page either.
What to do
- In
parseMetaTags, useog:image:urlwhen the page has noog:imagewith content. An easy way is to decide before the loop which of the two starts an image group, then use that one everywhere the loop checks forog:imagenow. - It goes through
resolveUrllikeog:imagedoes, the first one with content wins, and the width and height after it belong to it. - When the page has an
og:imagewith content, ignoreog:image:url, whichever comes first. It must not start a new group, or the width and height after it would be lost. og:image:secure_urlisn't part of this one.- Add tests to
tests/lib/meta-fetcher.test.ts.
Acceptance criteria
- The example above gives the absolute image URL,
1200and630, and neither of the two missing image errors - With both tags,
og:imageis used in either order, and its width and height are kept whenog:image:urlsits between them - An empty
og:imagenext to anog:image:urlwith content usesog:image:url - With several
og:image:urltags, the first one with content is used, with its own width and height - Pages without
og:image:urlcome out exactly as before - A test that fails on the current code
-
npm run check,npm run testandnpm run buildpass
How to test
Run the new tests, then npm run dev, open /preview and check a page whose only image tag is og:image:url. The report should list the image, and the previews should show it.
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #455 in the description.
- 主要言語
- TypeScript
- スター
- 8
- フォーク
- 4
- 平均マージ
- 1日 21時間
- マージ済み PR(30日)
- 34
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
codercops/ogcops のほかの issue
-
Preview checker: a long `og:title` or `og:description` gets no warning when the page also has a normal title and description対応中かも @Imhamza86 が今日担当しました。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
codercops/ogcops#458 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
[Bug] “Copy Recommended Meta Tags” generates an unusable placeholder image URL再び着手できるかも @CreatorguyS が 34 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
codercops/ogcops#378 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
good first issue templates
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
メンテナーはふだん 2 日以内に返信
-
good first issue templates
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
codercops/ogcops#341 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
codercops/ogcops の issue をすべて見る
似ている issue
-
clawsweeper:intake:bug clawsweeper:intake:needs-environment
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
openclaw/openclaw#212827 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
KT-2245 e2e specs that call the backend directly fall back to the developer's own Kronn on :3140オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Use one constant for the 10,000-character input limit対応中かも @NginxL が今日担当しました。 オープンgood first issue refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
aniru-dh21/snap-validate#51 ·
メンテナーはふだん 1 日以内に返信
-
dependencies effort: small good first issue priority: low
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
TMHSDigital/screencast-mcp#509 ·
メンテナーはふだん 1 日以内に返信
-
from-review tech-debt testing
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
blamechris/chroxy#9520 ·
メンテナーはふだん 1 日以内に返信