Astro SSR - Netlify Image CDN - how to set Cache-control for browser

Hi Netlify Support,

I am struggling with high bandwidth usage on my site https://otevrenazahrada.cz/ due to Netlify Image CDN forcing max-age=0 on all transformed images, which prevents browser caching.

Project Setup:

  • Framework: Astro (SSR mode) with @astrojs/netlify adapter.

  • Component: Using Astro’s <Image /> component.

  • Image Source: Remote CMS (Kentico) configured in astro.config.mjs.

The Issue: My origin server (CMS) correctly sends the following header for the source images: cache-control: public, max-age=3600, must-revalidate Example origin URL: https://kentico.otevrenazahrada.cz/…/oz-aerial-(1).webp

However, the response from Netlify Image CDN changes this to: cache-control: public, max-age=0, must-revalidate Example CDN URL: https://otevrenazahrada.cz/.netlify/images?url=https%3A%2F%2Fkentico…

Goal: I need the browser to cache images (at least for 1 hour) to reduce redundant requests and save egress bandwidth.

Thank you for your help!

Hey @partnerstvi :wave:,
Thanks for reaching out!

We’ve gone ahead and created a support ticket for you, so our team can follow up with you directly via email from the help desk. Our Support crew will be in touch with you by email soon.

Great news: these days anyone can reach out to Netlify Support. First, you can try getting an answer using Ask Netlify, our helpful AI search tool. If your question isn’t answered there, you can submit a ticket using the support form, and we’ll take it from there.

We’re keeping the community around for swapping ideas, sharing tips and tricks, and talking shop with other folks building on the platform — but for support issues, tickets are the way to go.

Thanks for being here, and keep an eye out for that email from us!