Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

262
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!