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

271
Vistas
Load image before anything else (render-blocking)

I have an image i want to load as the first thing when my page loads. Currently i have an img tag with a src but it loads asynchronously, how can i assure the browser loads my image before rendering the page further?

about 4 years ago · Santiago Gelvez
2 Respuestas
Responde la pregunta

0

A simple solution could be to use the preload attribute on <link>: Link types: preload. It is not a grantee that the content will be ready, as I read it, but maybe it fits your case.

Here is an example:

<head>
  <link rel="preload" href="https://via.placeholder.com/450" as="image"/>
</head>

<body>
  <img src="https://via.placeholder.com/450" />
</body>

about 4 years ago · Santiago Gelvez Denunciar

0

I have done something similare ...

I have a 'splash screen' (you can use a simple white div to simulate no rendering ...) Make a fetch to the img in js, then remove your splash screen ...

Fetch the img in js load the img in browser cache... so when your DOM display the img, she already in the browser cache ...

about 4 years ago · Santiago Gelvez 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