Files
Steven deed868499 feat(next/image): Add experimental imgOptMozjpeg config (#98571)
In a previous PR, `mozjpeg` was set to true which might be the reason
output jpeg spikes cpu.

- https://github.com/vercel/next.js/pull/65846

I made a benchmark and found that disabling MozJPEG saved 72% CPU, with
average outputs 31% larger.

- https://github.com/lovell/sharp/issues/4603

So this PR adds a new experimental flag to enable (or rather disable)
mozjpeg and try with real workloads. This is useful becaues in many
cases, cpu is more costly than bandwidth since most CDNs provide [near
unlimited bandwidth](https://vercel.com/blog/introducing-flat-rate-cdn).
2026-09-11 17:58:21 +00:00
..