Skip to content

feat(next/image): Add experimental imgOptMozjpeg config - #98571

Merged
eps1lon merged 1 commit into
vercel:canaryfrom
styfle:codex/imgopt-mozjpeg
Sep 11, 2026
Merged

eps1lon merged 1 commit into
vercel:canaryfrom
styfle:codex/imgopt-mozjpeg

Conversation

@styfle

@styfle styfle commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

In a previous PR, mozjpeg was set to true which might be the reason output jpeg spikes cpu.

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

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.

@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: 67adc98

@styfle
styfle marked this pull request as ready for review September 11, 2026 14:33
@styfle
styfle requested a review from lubieowoce September 11, 2026 14:38
@eps1lon
eps1lon enabled auto-merge (squash) September 11, 2026 17:57
@eps1lon
eps1lon merged commit deed868 into vercel:canary Sep 11, 2026
216 of 219 checks passed
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants