Preview checker: a page that only has `og:image:url` is reported as having no image
Mantenedores costumam responder em até 2 dias
@MugdhoAI já está trabalhando nisso.
Desde 4/12/2026.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 88/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- web-dev
Direção de pesquisa
Comece com parseMetaTags em src/lib/meta-fetcher.ts, depois revise resolveUrl e os casos existentes em tests/lib/meta-fetcher.test.ts. Execute o arquivo de teste focado e use npm run dev com /preview para reproduzir o relatório de imagem ausente. A tarefa será concluída quando og:image:url for tratado conforme especificado, o comportamento existente permanecer inalterado e npm run check, npm run test e npm run build passarem.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 8
- Forks
- 4
- Merge médio
- 1d 21h
- PRs com merge (30d)
- 34
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de codercops/ogcops
-
Preview checker: a long `og:title` or `og:description` gets no warning when the page also has a normal title and descriptionTalvez já em andamento @Imhamza86 assumiu hoje. Abertabug good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
codercops/ogcops#458 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
[Bug] “Copy Recommended Meta Tags” generates an unusable placeholder image URLTalvez livre de novo @CreatorguyS assumiu há 34 dias e não há nenhum pull request aberto. Abertabug enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
codercops/ogcops#378 · 4 comentários ·
Mantenedores costumam responder em até 2 dias
-
good first issue templates
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 2 dias
-
good first issue templates
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 2 dias
-
enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 30/100
codercops/ogcops#341 · 2 comentários ·
Mantenedores costumam responder em até 2 dias
Todas as issues de codercops/ogcops
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Vessel9817/onion-site-template#512 ·
Mantenedores costumam responder em até 1 dia
-
nightly-tests
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
BlackBeltTechnology/pi-agent-dashboard#1256 ·
Mantenedores costumam responder em até 1 dia
-
approved
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
fritzprix/libr-agent#3266 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
better-auth/better-auth#13101 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia