Next.js Discord

Discord Forum

Image optimization has to occur every 60 seconds in production due to using /api/media/file/ as urlI

Unanswered
Waterman posted this in #help-forum
Open in Discord
Hello,
when I use the next js Image component I don't get it work with the cache in production, it seems like the image has to be optimized every time you enter the website after 60 seconds, which makes the image take atleast 1 second no matter the size... How could I fix this, any help appreciated!

Note that I get the image through my payload 3.0 cms where the url is something like /api/media/file/[url], all I want is the caching to work properly, if you wanna see this in action you can enter https://mellbygardrep.vercel.app/ and check the logo, then wait about 60 seconds and reload, and the image optimizationshould be having to occur again(Ateast I think it is the optimization

thanks!

0 Replies