NextImage Revalidation

I have created an API path that returns a dynamic SVG and I am using Next/Image to render it on my landing page. It looks like the image has been cached and it does not revalidate. I checked the cache status by checking x-nextjs-cache header and I got STALE which means that the path is in the cache but exceeded the revalidate time so it will be updated in the background. However, it did not update. What it looks like: (look bottom right corner) https://stephenasuncion.dev/ API: https://stephenasuncion.dev/api/spotify?v=2
5 Replies
asheeshh
asheeshh2y ago
are you passing any cache control headers to the response?
Typedef
Typedef2y ago
im not
asheeshh
asheeshh2y ago
then add the headers?
asheeshh
asheeshh2y ago
i personally use this for my spotify api
Typedef
Typedef2y ago
still doesnt work you are returning json here not image bump
Want results from more Discord servers?
Add your server