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
Avif server as octet-stream #39706
Comments
And when you run it locally via yarn, yarn run dev? I think it is broken even when running yarn run build && yarn run start. |
@pegak Yes. I am able to reproduce the issue in local environment. next.js/packages/next/server/serve-static.ts Lines 23 to 28 in cc1f3b8
Next.js already implemented |
@pegak I have submitted a PR that will fix the issue: #39733 |
Thank you very much! I must make some time to contribute to open source community to give something back! :) |
The PR fixes #39706 by adding `avif` mime type directly to `send`. The PR also removes the previous avif workaround for image optimizer. Note: The PR is still a workaround for now. I will submit a PR to `pillarjs/send` to help them update `mime` to fix the issue once and for all. But now `send.mime.define` just works. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
@pegak Actually now you have a great opportunity to start with! Your issue is caused by an upstream package send. It depends on another package mime to provide the content-type mapping. The A few notes:
|
Thanks, looks like they already switched to |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Same problem as for Gatsby: gatsbyjs/gatsby#31068
Or previously Remix: remix-run/remix#3771
What browser are you using? (if relevant)
Chrome 104, Edge 106
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
Wrong mime type for AVIF image from public folder.
Expected Behavior
Correct Content-Type, so image can be loaded.
Link to reproduction
https://github.com/pegak/nauc-me-it - you need to have pixel density 2x, run locally and check bg-landing.avif loading :)
To Reproduce
octet-stream
.The text was updated successfully, but these errors were encountered: