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
asheeshh3y ago
are you passing any cache control headers to the response?
Typedef
TypedefOP3y ago
im not
asheeshh
asheeshh3y ago
then add the headers?
asheeshh
asheeshh3y ago
i personally use this for my spotify api
Typedef
TypedefOP3y ago
still doesnt work you are returning json here not image bump
Want results from more Discord servers?
Add your server