#Images slow to render on first load

3 messages · Page 1 of 1 (latest)

dusk flame
#

On first load, the images take a little bit to load, but I assume are cached for future loads. Does anyone else see this behavior? I'm not sure what I'm doing wrong or if this is unsolvable. Here's my site: https://kennyhui.dev/

I'm using https://docs.astro.build/en/guides/images/#display-optimized-images-with-the-image--component

Here's the element; project is Astro.props

<Image
  class="absolute inset-0 w-full h-full..."
  src={project.cover}
  alt={project.coverAlt}
  loading="eager"
/>

All the images are 3840 × 2160.

Docs

Learn how to use images in Astro.

turbid hornet
#

The images loaded at the same time as everything else for me

modest tundra
#

Any reason you're using such high res images for small panels? I think if you just set a reasonable width you will improve loading speeds by a lot. If you want to improve it further you could look into using responsive images with srcset