Next Image overflow my VPS storage in one day
Unanswered
California pilchard posted this in #help-forum
California pilchardOP
Okay I host my NextJS (v15) app on a hetzner with Coolify. But my VPS storage is completely overflow with cached image with
next/image
. How do we prevent caching when there is no more space because when hitting VPS storage limit, my docker containers just crash and everything stop working. How are we supposed to manage optimized image in NextJS ? Thx a lot !1 Reply
Bengal
Great question I guess. I think there is no native way as far as is know. But maybe mount a local file path or block storage to the folder where the images are located. Keep that big enough and have a simple cron job deleting older images again.
We also started to use Cloudflare in front and use Cloudflare images. That way we get way faster transcoding and have images being served from the CDN
We also started to use Cloudflare in front and use Cloudflare images. That way we get way faster transcoding and have images being served from the CDN