Skip to content

Does this plugin support "static" images? #596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stefanprobst opened this issue Aug 11, 2021 · 3 comments
Closed

Does this plugin support "static" images? #596

stefanprobst opened this issue Aug 11, 2021 · 3 comments
Labels
question Further information is requested

Comments

@stefanprobst
Copy link

Is your feature request related to a problem? Please describe.

This is more a question:

Next.js recently added the ability to serve "static" images, i.e. imported images will get a cache header of public,max-age=31536000,immutable. when deploying the project on netlify however, i get public, max-age=0, must-revalidate.

Is this something I need to configure somewhere, or something this plugin does not support (yet)

@lindsaylevine lindsaylevine added the question Further information is requested label Aug 23, 2021
@lindsaylevine
Copy link

hey @stefanprobst! my teammate @ascorbic who's OOO right now would be the best person to answer this for you, but i'll try to get some info for you until he comes back. if you don't hear from me again, then i'll just be deferring to him. stay tuned 📻

@ascorbic
Copy link
Contributor

Hi. We don't handle headers for static images in the build plugin, but rather let the Netlify CDN handle them. By default it sets must-revalidate, but because it uses an etag, it will quickly return a 302 not modified response from the edge.

@stefanprobst
Copy link
Author

cool, thanks for the info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants