mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
7c19c7c06a
We were missing some test coverage for image optimization. This PR adds tests for many missing image formats. Additionally, this PR also ensures the sharp encoders match that allowlist from detectContentType() such that future versions of sharp that enable new encoders by default are not automatically enabled in next/image. Practically, there is no change to the end user because detectContentType() runs before sharp so that is the true allowlist, but this gives us a little more control to align the sharp allowlist as well (since sharp can release new features in semver minor).