#Might be missing something out here....

30 messages · Page 1 of 1 (latest)

dusky frigate
#

Lets keep it simple:

<Image
                          src={
                            evidence.thumbnail
                              ? `https://blablabla.de/evidence/${evidence.thumbnail}`
                              : ""
                          }
                          width={160}
                          height={80}
                          style={{borderRadius: "10px"}}
                          alt={"Thumbnail"}
                        />

The image request goes trough my backend -> This is the url i receive. Everything is correct.

Now what happens is that one of my functions loads another but same image component with the same exact image ->

<Image
                              src={`https://blablabla.de/evidence/${currentEvidence?.thumbnail}`}
                              width={730}
                              height={0}
                              quality="100"
                              style={{
                                height: "700px",
                                width: "100%",
                                borderRadius: "10px",
                                boxShadow: "0px 0px 100px 82px rgba(255, 255, 255, 0.09)",
                              }}
                              alt="Thumbnail"
                            />

for some reason tho the path is now null ```tsx
/null


Does it have something to do with next/image or my thirdparty dedicated
willow blazeBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

dusky frigate
#

When i manually go on the url where the image is served i get my image back

#

and console shows me that it requested the same url but didnt get a answer back since my middleware fails because the path is null

#

and i need the information

chilly willow
#

I think currentEvidence might be null/undefined initially. Try console logging that value in your component

dusky frigate
#

but the path is defined since it shows me the request in the console

#

with the right url

chilly willow
#

Ah I see what you're saying. If you write the src of the second Nextimage the way you did the first one, any difference?

dusky frigate
#

take a look at the url

#

same url again ->

#

kinda starting to figure out something

#

i never received the request on the first screenshot

#

nextjs might be caching the image

#

oh yeah

#

im starting to see the issue

#

nextjs is caching all request with the same url

#

even tho the image is changing

#

this might be the issue

#

i will attach a random string probably the date in unix epoch

#

to the url

#

or is there a way to disable caching @chilly willow

#

the main issue is how i save my images

#

i use a already defined uuid and when for example i reupload something for that uuid the paths ofc wont change

#

will be still -> /uuid/0/image.jpg

#

so the easiest and most optimized way would be to randomize the imagename itself

#

think thats better instead of appending some random searchparam