According to DEV Community, a developer tested the effort option in sharp's webp() function. Sharp is a Node.js image library. Effort is a CPU setting from 0 (fastest) to 6 (slowest), and the default is 4. It sets how many encoding tools the encoder tries. It should not change visual quality.
On a 1920 × 1076 photo at quality 80, effort 0 wrote 130.9 KB in 34 ms. Effort 2 wrote 110.4 KB in 60 ms, which is 15.6% smaller. Effort 6 wrote 102.3 KB but took 214 ms. The default, effort 4, wrote 106.9 KB in 141 ms. Efforts 3 and 4 produced almost the same size and speed on this photo. PSNR, a rough quality score, stayed between 38.47 dB and 38.69 dB at every level, so the levels traded time for bytes rather than quality.
A flat pricing page screenshot showed a steeper curve. Effort 0 to 6 saved 25.5%, against 21.9% on the photo, and effort 2 was already within 4.9% of effort 6. Lossless WebP behaved differently. On the screenshot, efforts 2, 3 and 4 wrote identical files of 323,152 bytes, while effort 6 wrote a file 5.0% larger. On the lossless photo, effort 6 saved about 274 KB over effort 0 but took 2,820 ms against 683 ms.
The author suggests effort 2 or 3 for uploads and queue jobs, and effort 5 or 6 for build steps that run once per image. For lossless WebP, the author suggests 2 to 4 and says to test 5 and 6 first. Efforts 0 and 1 are best skipped for files people will download. The tests used one photo and one screenshot on an Apple M1 Pro, with sharp 0.35.4. Linux servers, animated WebP and some other options were not tested.
Why it matters
Image weight affects how fast pages load, and WebP is a common format for cutting it. This test shows that one setting can change file size by around a fifth without changing how the picture looks. If your tool runs at a low effort, you may be shipping larger files than needed. If it runs at a high one, you may be spending server time for small gains.
The right level depends on when the encoding happens. Work done once at build time can afford a slow setting. Work done when a user uploads a file is better with a faster one. The results also come from a small test on one machine, so treat the numbers as a guide and not a rule.
The takeaway is practical: check what effort your image pipeline uses, then compare file sizes and encode times on a few of your own images.
Source: DEV Community. This brief summarises their reporting; read the original for the full detail.