Skip to content

Next 14.1.1 Image Optimization Breaking Changes #374

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
2 tasks done
khuezy opened this issue Mar 2, 2024 · 6 comments · Fixed by #377
Closed
2 tasks done

Next 14.1.1 Image Optimization Breaking Changes #374

khuezy opened this issue Mar 2, 2024 · 6 comments · Fixed by #377
Labels
help wanted Extra attention is needed

Comments

@khuezy
Copy link
Contributor

khuezy commented Mar 2, 2024

Open-Next Image Optimization Code

New nextjs code

  • Update open-next image-optimization handler to sync w/ the new breaking changes
  • Add e2e test that loads an image and checks the Content-Type to be image/webp
@khuezy khuezy added the help wanted Extra attention is needed label Mar 2, 2024
@chungweileong94
Copy link
Contributor

As of now, I patched the image optimization adapter manually as a workaround.
[email protected]

@khuezy
Copy link
Contributor Author

khuezy commented Mar 4, 2024

@chungweileong94 would you mind putting up a PR for that?

@chungweileong94
Copy link
Contributor

@chungweileong94 would you mind putting up a PR for that?

I would love to, but that will means that the minimum NextJS has to be 14.1.1 tho, any idea how to handle backward compatibility?

@chungweileong94
Copy link
Contributor

I mean like is there any existing version specific code that already exists in the codebase?

@khuezy
Copy link
Contributor Author

khuezy commented Mar 4, 2024

We have a very hacky plugin system that replacing code during the prebuild time. See: https://github.com/sst/open-next/blob/main/packages/open-next/src/adapters/plugins/14.1/util.ts

For the individual files, we do this:https://open-next.js.org/inner_workings/plugin

@chungweileong94
Copy link
Contributor

We have a very hacky plugin system that replacing code during the prebuild time. See: https://github.com/sst/open-next/blob/main/packages/open-next/src/adapters/plugins/14.1/util.ts

Ah I see, will take a look at that, thx for the info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants