Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

284
Visualizações
How can i render an async image into my twitter card (twitter:image)

Hey guys i just had an question which i haven't found on the internet.

So basically i am making an twitter card, but the problem here is that the image generator is async. It generates the image by giving numbers or string.

So the code will be something like this:

<meta
  name="twitter:image"
  content={`https://image-generator/${some_string_or_number_in_here}.png`}
 />

But when i try to make it as twitter card it does not work. Doesn't either show up or it shows an default image.

I know twitter card expects an direct link which already exists, but this one is an node app which generates png's for you.

Any suggestions guys how i can fix this ?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Please try this

 let _desc = `https://image-generator/${some_string_or_number_in_here}.png`;
document.querySelector('meta[name="twitter:image"]').setAttribute("content", _desc);
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda