Next.js Discord

Discord Forum

Next/Image not working

Answered
Tonkinese posted this in #help-forum
Open in Discord
TonkineseOP
Hey,

I am using next image on multiple pages without a problem. But in just one component it wont work.
the url is in the image, but my browser shows it as grey:
Answered by Northeast Congo Lion
View full answer

89 Replies

TonkineseOP
When using the normal <img> it works
Northeast Congo Lion
have u configured remotePatterns inside next config?
please share component code snippet to help
They worked locally then deployed no
As you see i commented out the one that i said that it isnt working
i am using <img> currently
Northeast Congo Lion
width & height have values?
they are not just 0 e.g ad.advertisementHeight is valid
i would double check that
@Northeast Congo Lion they are not just 0 e.g `ad.advertisementHeight` is valid
TonkineseOP
They are not just 0
Northeast Congo Lion
just to check, have u exceeded ur image limits on vercel?
@Northeast Congo Lion just to check, have u exceeded ur image limits on vercel?
TonkineseOP
There are image limits? 😅
Northeast Congo Lion
yes
i am pretty sure
@Northeast Congo Lion i am pretty sure
TonkineseOP
I cant find the Limits overview where i can see how much i used xD
Northeast Congo Lion
go to vercel.com
login of course ^
TonkineseOP
Ah thank you i was on the project not on the start page
But nope
@Tonkinese Hey, I am using next image on multiple pages without a problem. But in just one component it wont work. the url is in the image, but my browser shows it as grey:
TonkineseOP
The browser also did show it for a short time but it also was grey on the browser code
Northeast Congo Lion
is there any 404 in console?
TonkineseOP
When I was using Next/Image locally everything worked fine
After Deploying it didnt load it anymore
Northeast Congo Lion
can u send me url
TonkineseOP
Wait let me deploy it again with next/image so
Northeast Congo Lion
ty
TonkineseOP
Are you doing Next/Js for a long time?
Northeast Congo Lion
a couple years almost
i have never encountered this issue before
Brown bear
hey, guys
@Brown bear hey, guys
TonkineseOP
hello ✌️
@Northeast Congo Lion a couple years almost
TonkineseOP
Okay great, maybe I also could ask you another thing after it?
It is deploying
Should take some secs
Brown bear
hello
a u begginer for next
TonkineseOP
I am learning it since some months
@Northeast Congo Lion Here you go: https://canary.modguard.xyz/captcha/xxx
Northeast Congo Lion
which image is issue?
@Tonkinese
Brown bear
hey, guys
can u check this?
TonkineseOP
It is randomly using a image from the db. It should be placed under that text
Northeast Congo Lion
works okay for me
do u have adblock installed?
Brown bear
canary.exchange
TonkineseOP
Yes but it would wonder me if it would detect it as an ad
Northeast Congo Lion
it might
TonkineseOP
lol
Really was that
Northeast Congo Lion
yes
because
you have
advertisment
TonkineseOP
So it really is an great detector :omeING:
Northeast Congo Lion
in url
so its a keyword ur adblock will close out
TonkineseOP
Good To Know
Northeast Congo Lion
so change ur image host url
to anything that doesnt contain advertise
Northeast Congo Lion
Answer
Northeast Congo Lion
as u can see in nextjs image url
i can't say 100%, but 99.99% of the time when u have adblock + use that keyword in url/element etc
it will cause issue
u can whitelist ur domain tho
for ur adblock 🙂
TonkineseOP
Okay thanks so much. And if i might ask something to?
Northeast Congo Lion
sure
TonkineseOP
Did you ever work with any Project that had payments or like stripe in it?
Northeast Congo Lion
sort of
whats the question?
is it a technical question or just some advice
TonkineseOP
Technical Question & Advice
Like it is both
Northeast Congo Lion
okay, what to do
is mark this issue as solved
and we can make new issue
TonkineseOP
sure
Northeast Congo Lion
the reason I say this is because if anoher user has same issue as you
they can find this
TonkineseOP
But it is very specific about that project
I guess more like an advice
Northeast Congo Lion
yes sure, just open new help forum issue
TonkineseOP
Okay