0

Got this error message on the console

The resource "xxx.svg" was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.enter image description here

And here is my code

import Image from 'next/image' <Image src={xxx} width={32} height={24} priority /> 

Here is my code

I expect to do the correct next image rendering with Priority attribute without the warning message.

1 Answer 1

1

I ran into this because I had a default image in the largest contentful paint, but when it needed to look up an image it gave me this warning if I used the priority attribute. So I simply enabled priority only for the default attribute and that solved it for me. Something like this:

<Image priority={use_default ? true : false} ... />

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.