According to DEV Community, the LighterPics project tested what happens when an existing JPEG is exported again through a browser canvas, which decodes the image to pixels and writes a new file. The report notes it was written with AI assistance. The API does not promise the new file will be smaller than the original.
At JPEG quality 0.92, five of 25 test photos grew in Chromium, 10 in Firefox and 11 in WebKit. For every photo, the Firefox and WebKit files were larger than the Chromium file. At quality 0.70, no photo grew in Chromium and the median output was 26% of the input. At quality 1.0, the median output was nearly twice the input size. In Chromium, WebP at 1.0 produced lossless files, and PNG made every photo larger in all three engines. WebKit produced no accepted WebP output.
The tool's compressor tries to hit a byte target. Across 1,407 Chromium runs that produced a file, it returned 177 files larger than their inputs. Each had a target at or above the input size, so each technically met the budget. Of those, 159 came from the first attempt at quality 0.92. Shrinking the pixel dimensions helped when the target was below the input size.
The starting file also mattered. Four of five PNG screenshots grew when converted to JPEG at 0.92. When photos were first converted to WebP at 0.80 and then converted again, every file grew compared with that WebP. The author notes the results come from one machine, a small photo set and no human check of visual quality, and the cause of the engine differences was not identified.
Why it matters
If you use a browser-based tool, plugin or script that re-encodes images, a smaller quality setting or a size cap does not guarantee a lighter file. A file can fit under your target and still be bigger than the original. That adds page weight without any visible gain.
Repeated conversion is another risk. An image that has already been compressed hard may have little left to save, and converting it again can add bytes. Results also differed between browsers, so one test does not cover every visitor or tool.
Source: DEV Community. This brief summarises their reporting; read the original for the full detail.