-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(next/image): prefer sharp defaults, use mozjpeg for JPEG (#65846)
### What? Upgrades sharp to the latest version and relies on more of its default settings (if the default settings are unsuitable, we should consider improving these for all users in sharp itself). - The `sequentialRead` setting is now managed for you based on each input image and the operations to be applied to it. - The concurrency detection is more accurate than `os.cpus()` as it now inspects things like CPU set/affinity as well as the memory allocator. - The (mostly archaic) concept of chroma subsampling is not required for AVIF output. Using full chroma should improve the quality of red/orange edges, as well as slightly reducing file size as it allows greater use of AV1 chroma-from-luma prediction. In addition, this PR also enables the use of mozjpeg features such as trellis quantisation to produce smaller file sizes. The use of `mozjpeg: true` infers `progressive: true`. This aligns JPEG output behaviour with the previously-used squoosh, which always used mozjpeg. /cc @styfle
- Loading branch information
Showing
8 changed files
with
51 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.