Preview checker: a page that only has `og:image:url` is reported as having no image
Maintainer thường phản hồi trong vòng 2 ngày
@MugdhoAI đang làm issue này rồi.
Từ ngày 4/12/2026.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- web-dev
Hướng nghiên cứu
Bắt đầu với parseMetaTags trong src/lib/meta-fetcher.ts, sau đó xem xét resolveUrl và các trường hợp hiện có trong tests/lib/meta-fetcher.test.ts. Chạy tệp kiểm thử được tập trung và sử dụng npm run dev với /preview để tái hiện báo cáo thiếu ảnh. Hoàn tất khi og:image:url được xử lý đúng như đã chỉ định, hành vi hiện tại không thay đổi và npm run check, npm run test cùng npm run build đều thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 8
- Fork
- 4
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 34
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của codercops/ogcops
-
Preview checker: a long `og:title` or `og:description` gets no warning when the page also has a normal title and descriptionCó thể đã có người làm @Imhamza86 đã nhận hôm nay. Đang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
codercops/ogcops#458 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug] “Copy Recommended Meta Tags” generates an unusable placeholder image URLCó thể làm lại được @CreatorguyS đã nhận 34 ngày trước và không có pull request nào đang mở. Đang mởbug enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
codercops/ogcops#378 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
good first issue templates
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 2 ngày
-
good first issue templates
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
codercops/ogcops#341 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của codercops/ogcops
Issue tương tự
-
clawsweeper:intake:bug clawsweeper:intake:needs-environment
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
openclaw/openclaw#212827 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
KT-2245 e2e specs that call the backend directly fall back to the developer's own Kronn on :3140Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Use one constant for the 10,000-character input limitCó thể đã có người làm @NginxL đã nhận hôm nay. Đang mởgood first issue refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
aniru-dh21/snap-validate#51 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dependencies effort: small good first issue priority: low
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
TMHSDigital/screencast-mcp#509 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
from-review tech-debt testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
blamechris/chroxy#9520 ·
Maintainer thường phản hồi trong vòng 1 ngày