rsnext/docs
Steven 07c4ec052e
feat(next/image)!: remove squoosh in favor of sharp as optional dep (#61696)
## History

Previously, we added support for `squoosh` because it was a wasm
implementation that "just worked" on all platforms when running `next
dev` for the first time. However, it was slow so we always recommended
manually installing `sharp` for production use cases running `next
build` and `next start`.

Now that [`sharp` supports
webassembly](https://sharp.pixelplumbing.com/install#webassembly), we no
longer need to maintain `squoosh`, so it can be removed. We also don't
need to make the user install sharp manually because it can be installed
under `optionalDependencies`. I left it optional in case there was some
platform that still needed to manually install the wasm variant with
`npm install --cpu=wasm32 sharp` such as codesandbox/stackblitz (I don't
believe sharp has any fallback built in yet).

Since we can guarantee `sharp`, we can also remove `get-orientation` dep
and upgrade `image-size` dep.

I also moved an [existing `sharp`
test](https://github.com/vercel/next.js/pull/56674) into its own fixture
since it was unrelated to image optimization.

## Related Issues
- Fixes https://github.com/vercel/next.js/issues/41417
- Closes https://github.com/vercel/next.js/pull/54670
- Related https://github.com/vercel/next.js/issues/54708
- Related https://github.com/vercel/next.js/issues/44804
- Related https://github.com/vercel/next.js/issues/48820
2024-02-06 14:17:07 -05:00
..
01-getting-started Docs: Update parallel routes docs, add default.js pt 1. (#60806) 2024-01-18 17:57:54 -06:00
02-app Add case-sensitive note for revalidateTag/revalidatePath (#61729) 2024-02-06 10:30:42 -08:00
03-pages feat(next/image)!: remove squoosh in favor of sharp as optional dep (#61696) 2024-02-06 14:17:07 -05:00
04-architecture Removed an extra braces and comma from doc (},) (#61250) 2024-01-29 02:10:47 +00:00
05-community Update README.md (#48717) 2024-02-04 18:47:51 -08:00
index.mdx docs: fix broken link to learn course (#59288) 2023-12-05 08:39:54 -06:00