minimumCacheTTL for images not setting correct caching header? #33632
-
I'm using the
Right now it works but the
I tried to use Not sure what I'm doing wrong or if I am missing something. My attempts:
|
Beta Was this translation helpful? Give feedback.
Replies: 13 comments 5 replies
-
+1 |
Beta Was this translation helpful? Give feedback.
-
Tried using minimumCacheTTL without success either... the Cache-Control is never set whatever value I input in next.config.js |
Beta Was this translation helpful? Give feedback.
-
@GregoryWullimann have you found a way to set max-age cache-control to some other value? |
Beta Was this translation helpful? Give feedback.
-
I set the minimumCacheTTL 600000 but it looks like header still shows 60 seconds. Is there anyone find information about this? |
Beta Was this translation helpful? Give feedback.
-
Same for me, I set minimumCacheTTL to 31536000 but it shows max-age=60 |
Beta Was this translation helpful? Give feedback.
-
It looks like this issue was created over a year ago. @GregoryWullimann, did you manage to find a solution for this problem? I'm having trouble getting minimumCacheTTL and Cache-Control to work with the Next.js Image component, even though I followed the documentation at https://nextjs.org/docs/pages/api-reference/components/image#minimumcachettl. Specifically, I'm using a local image and neither of these properties seems to have any effect. I was wondering if anyone could provide some assistance or guidance on how to solve this issue. |
Beta Was this translation helpful? Give feedback.
-
same here. minimumCacheTTL has no effect at all. |
Beta Was this translation helpful? Give feedback.
-
@leerob any thoughts? |
Beta Was this translation helpful? Give feedback.
-
It works when you build and run on the local server. But it doesn't work when you deploy it to Vercel |
Beta Was this translation helpful? Give feedback.
-
Facing the exact same issue here - not sure why they has been no updates regarding this |
Beta Was this translation helpful? Give feedback.
-
Having the same problem where |
Beta Was this translation helpful? Give feedback.
-
Related #52569? |
Beta Was this translation helpful? Give feedback.
-
Fortunately, I found out that setting |
Beta Was this translation helpful? Give feedback.
Related #52569?