Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

282
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda