Link preload in nextjs app router
Unanswered
Dwarf Crocodile posted this in #help-forum
Dwarf CrocodileOP
is it possible to do this in
using the export metadta in the approuter? I can't find any references to preload when looking in the types or the docs
<link
rel="preload"
href="/path/to/image.ext"
as="image"
/>
using the export metadta in the approuter? I can't find any references to preload when looking in the types or the docs
3 Replies
Toyger
links prefetched by default when became visible, you can read more here https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching
Asian paper wasp
If what you want is to preload a high-priority image, you could just use
https://nextjs.org/docs/app/api-reference/components/image#priority
<Image priority />
https://nextjs.org/docs/app/api-reference/components/image#priority
Dwarf CrocodileOP
Its a css background image that’s my problem