Compression test results: seven samples at 100KB to 1MB
Last updated November 14, 2026 · written by ew
Compressor sites love the phrase “no visible loss”. I wanted to know what my own code actually does, so I generated seven images of the kinds people usually need to upload and ran SlimPic’s compression function on each of them. Every number below comes from those runs, and the source files are here so you can repeat them.
About the samples
None of these are photographs. They are drawn in the browser by a script, because I did not want to publish real people’s photos and I wanted the same files every time the script runs. I tried to give them the traits of real uploads: 90,000 grass blades and sensor noise in the landscape, heavy grain in the low-light room, paper texture and a 0.23° tilt in the scan. They are still not camera photos, and the deliberate noise makes them harder to compress than a typical picture.
- Landscape (phone camera size) landscape.jpg · 3.64MB · 4032×3024
- Low-light interior (noisy) night.jpg · 4.29MB · 4032×3024
- Product shot (light background) product.jpg · 1.32MB · 3000×3000
- Phone chat screenshot phone-screenshot.png · 429KB · 1179×2556
- PC spreadsheet screenshot (13px text) pc-screenshot.png · 283KB · 1920×1080
- A4 scan at 300dpi scan-a4.jpg · 1.59MB · 2480×3508
- Logo with transparency logo-transparent.png · 1.84MB · 2000×2000
- Portrait for an ID photo id-portrait.jpg · 2.09MB · 3024×4032
Test conditions. Measured 2026-11-14 with chromium 157.0.8103.51 (via Playwright) on an Apple M3, 16GB RAM, macOS 15.6.1. SlimPic’s own compress() from src/lib/compression.js was called on the main thread with “quality first” priority. Time is wall-clock time for one image. Quality is the encoder setting that produced the saved file. PSNR compares the result with the original after both are resampled to the same viewing width (photos 1280px, screenshots at native width); higher means closer to the original. Script: scripts/run-experiments.mjs; raw data: experiments/results/.
Overview: Auto setting
Each cell shows output dimensions, quality setting and file size. “Unchanged” means the original was already under the target and was returned as is.
| Sample | Original | 100KB target | 200KB target | 500KB target | 1MB target |
|---|---|---|---|---|---|
| Landscape (phone camera size) | 3.64MB 4032×3024 | 1190×892 q0.63 · 98.9KB | 1901×1426 q0.52 · 199KB | 3006×2255 q0.57 · 499KB | 4000×3000 q0.63 · 992KB |
| Low-light interior (noisy) | 4.29MB 4032×3024 | 1400×1050 q0.76 · 97.0KB | 1929×1447 q0.73 · 192KB | 3051×2288 q0.64 · 486KB | 4000×3000 q0.61 · 996KB |
| Product shot (light background) | 1.32MB 3000×3000 | 1752×1752 q0.68 · 97.4KB | 2479×2479 q0.62 · 196KB | 3000×3000 q0.76 · 491KB | 3000×3000 q0.84 · 996KB |
| Phone chat screenshot | 429KB 1179×2556 | 1179×2556 q0.86 · 99.7KB | 1179×2556 q0.98 · 175KB | unchanged | unchanged |
| PC spreadsheet screenshot (13px text) | 283KB 1920×1080 | 1920×1080 q0.87 · 99.4KB | 1920×1080 q0.98 · 139KB | unchanged | unchanged |
| A4 scan at 300dpi | 1.59MB 2480×3508 | 1257×1778 q0.65 · 98.3KB | 1778×2515 q0.61 · 199KB | 2480×3508 q0.57 · 492KB | 2480×3508 q0.75 · 773KB |
| Logo with transparency | 1.84MB 2000×2000 | 2000×2000 q0.61 · 99.9KB | 2000×2000 q0.94 · 197KB | 2000×2000 q0.98 · 260KB | 2000×2000 q0.98 · 260KB |
What stood out
A smaller target does not always mean a lower quality setting. The landscape used quality 0.63 at 100KB but 0.52 at 200KB. The code first tries the full size down to quality 0.48, then shrinks the image and searches again. At 100KB the width had already dropped to 1190px, which left room for a higher setting. The quality number alone tells you little.
4032×3024 becomes 4000×3000 even at 1MB. Encoding is capped at 12 million pixels, and the usual phone size is 12.19 million. While measuring I also found that this cap caused files already under the target to be re-encoded; a 3.64MB photo with a 5MB target came back at 4.49MB. That is fixed now.
WebP is slow. Fitting the landscape into 1MB took 14.1s as WebP and 1.0s as JPG. WebP scored slightly higher at the same size (38.6 dB vs 37.5 dB). The transparent logo, which Auto saves as WebP, took 7.2s at 100KB.
PNG is a poor choice for photos. PNG has no quality setting, so the only way to hit a target is to shrink the image. The landscape as a 1MB PNG came out at 761×571.
Do not compare PSNR across samples. The low-light room scores higher than the landscape mostly because it is a big flat wall. The numbers are useful for comparing settings on the same sample. From looking at the crops, results above about 40 dB needed a side-by-side comparison to spot differences, while anything under 32 dB looked smeared without zooming.
Zoomed crops: landscape
A 480×320 crop of the treeline and lake, scaled to the same size. The sensor grain disappears first. At 100KB the ripples turn into soft bands and the trees into green mush. At 200KB some leaf detail returns, but the water texture is still gone. Around 500KB it starts to look like the original.




The scan held up better. At 200KB (width 1778px) the 30px footnotes were still readable, with faint smudges around the letters and the paper texture smoothed away. The thin ring of the stamp was softer than in the original.


Full tables per sample
All four output settings at all four targets. For JPG inputs, Auto and JPG produce byte-identical files.
Landscape (phone camera size): original 3.64MB, 4032×3024px
| Setting | Target | Result | Output | Size (px) | Quality | Time | PSNR |
|---|---|---|---|---|---|---|---|
| Auto | 100KB | 98.9KB | JPG | 1190×892 | 0.63 | 590ms | 29.9 |
| Auto | 200KB | 199KB | JPG | 1901×1426 | 0.52 | 623ms | 32.2 |
| Auto | 500KB | 499KB | JPG | 3006×2255 | 0.57 | 923ms | 35.1 |
| Auto | 1MB | 992KB | JPG | 4000×3000 | 0.63 | 1.0s | 37.5 |
| JPG | 100KB | 98.9KB | JPG | 1190×892 | 0.63 | 550ms | 29.9 |
| JPG | 200KB | 199KB | JPG | 1901×1426 | 0.52 | 580ms | 32.2 |
| JPG | 500KB | 499KB | JPG | 3006×2255 | 0.57 | 886ms | 35.1 |
| JPG | 1MB | 992KB | JPG | 4000×3000 | 0.63 | 1.0s | 37.5 |
| WebP | 100KB | 99.8KB | WebP | 1430×1072 | 0.58 | 5.4s | 31.5 |
| WebP | 200KB | 200KB | WebP | 2023×1517 | 0.68 | 7.8s | 33.9 |
| WebP | 500KB | 499KB | WebP | 4000×3000 | 0.51 | 12.8s | 36.6 |
| WebP | 1MB | 982KB | WebP | 4000×3000 | 0.80 | 14.1s | 38.6 |
| PNG | 100KB | 87.9KB | PNG | 238×178 | 0.98 | 772ms | 26.0 |
| PNG | 200KB | 174KB | PNG | 336×252 | 0.98 | 704ms | 26.9 |
| PNG | 500KB | 432KB | PNG | 538×404 | 0.98 | 709ms | 29.0 |
| PNG | 1MB | 858KB | PNG | 761×571 | 0.98 | 686ms | 31.4 |
Low-light interior (noisy): original 4.29MB, 4032×3024px
| Setting | Target | Result | Output | Size (px) | Quality | Time | PSNR |
|---|---|---|---|---|---|---|---|
| Auto | 100KB | 97.0KB | JPG | 1400×1050 | 0.76 | 532ms | 37.0 |
| Auto | 200KB | 192KB | JPG | 1929×1447 | 0.73 | 640ms | 38.0 |
| Auto | 500KB | 486KB | JPG | 3051×2288 | 0.64 | 963ms | 39.4 |
| Auto | 1MB | 996KB | JPG | 4000×3000 | 0.61 | 1.2s | 40.2 |
| JPG | 100KB | 97.0KB | JPG | 1400×1050 | 0.76 | 578ms | 37.0 |
| JPG | 200KB | 192KB | JPG | 1929×1447 | 0.73 | 635ms | 38.0 |
| JPG | 500KB | 486KB | JPG | 3051×2288 | 0.64 | 985ms | 39.4 |
| JPG | 1MB | 996KB | JPG | 4000×3000 | 0.61 | 1.2s | 40.2 |
| WebP | 100KB | 91.0KB | WebP | 1496×1122 | 0.85 | 5.3s | 37.6 |
| WebP | 200KB | 199KB | WebP | 2115×1586 | 0.81 | 7.5s | 38.4 |
| WebP | 500KB | 476KB | WebP | 3345×2508 | 0.74 | 13.8s | 39.1 |
| WebP | 1MB | 969KB | WebP | 4000×3000 | 0.66 | 15.4s | 39.5 |
| PNG | 100KB | 78.3KB | PNG | 254×191 | 0.98 | 858ms | 31.2 |
| PNG | 200KB | 166KB | PNG | 360×270 | 0.98 | 766ms | 32.2 |
| PNG | 500KB | 373KB | PNG | 531×398 | 0.98 | 768ms | 33.8 |
| PNG | 1MB | 791KB | PNG | 751×563 | 0.98 | 770ms | 35.9 |
Product shot (light background): original 1.32MB, 3000×3000px
| Setting | Target | Result | Output | Size (px) | Quality | Time | PSNR |
|---|---|---|---|---|---|---|---|
| Auto | 100KB | 97.4KB | JPG | 1752×1752 | 0.68 | 387ms | 40.8 |
| Auto | 200KB | 196KB | JPG | 2479×2479 | 0.62 | 586ms | 41.8 |
| Auto | 500KB | 491KB | JPG | 3000×3000 | 0.76 | 639ms | 47.5 |
| Auto | 1MB | 996KB | JPG | 3000×3000 | 0.84 | 748ms | 48.7 |
| JPG | 100KB | 97.4KB | JPG | 1752×1752 | 0.68 | 415ms | 40.8 |
| JPG | 200KB | 196KB | JPG | 2479×2479 | 0.62 | 553ms | 41.8 |
| JPG | 500KB | 491KB | JPG | 3000×3000 | 0.76 | 641ms | 47.5 |
| JPG | 1MB | 996KB | JPG | 3000×3000 | 0.84 | 714ms | 48.7 |
| WebP | 100KB | 99.6KB | WebP | 2550×2550 | 0.71 | 8.1s | 42.3 |
| WebP | 200KB | 195KB | WebP | 3000×3000 | 0.77 | 8.6s | 44.5 |
| WebP | 500KB | 450KB | WebP | 3000×3000 | 0.87 | 9.5s | 46.6 |
| WebP | 1MB | 898KB | WebP | 3000×3000 | 0.92 | 10.6s | 48.5 |
| PNG | 100KB | 91.4KB | PNG | 283×283 | 0.98 | 390ms | 31.8 |
| PNG | 200KB | 150KB | PNG | 380×380 | 0.98 | 307ms | 33.4 |
| PNG | 500KB | 396KB | PNG | 602×602 | 0.98 | 314ms | 36.0 |
| PNG | 1MB | 808KB | PNG | 851×851 | 0.98 | 326ms | 38.8 |
Phone chat screenshot: original 429KB, 1179×2556px
| Setting | Target | Result | Output | Size (px) | Quality | Time | PSNR |
|---|---|---|---|---|---|---|---|
| Auto | 100KB | 99.7KB | WebP | 1179×2556 | 0.86 | 2.4s | 42.9 |
| Auto | 200KB | 175KB | WebP | 1179×2556 | 0.98 | 215ms | 44.2 |
| Auto | 500KB | 429KB | PNG (original returned) | 1179×2556 | - | 0ms | ∞ |
| Auto | 1MB | 429KB | PNG (original returned) | 1179×2556 | - | 1ms | ∞ |
| JPG | 100KB | 99.9KB | JPG | 1002×2172 | 0.60 | 174ms | 31.8 |
| JPG | 200KB | 194KB | JPG | 1179×2556 | 0.85 | 202ms | 40.6 |
| JPG | 500KB | 388KB | JPG | 1179×2556 | 0.98 | 30ms | 44.1 |
| JPG | 1MB | 388KB | JPG | 1179×2556 | 0.98 | 28ms | 44.1 |
| WebP | 100KB | 99.7KB | WebP | 1179×2556 | 0.86 | 2.1s | 42.9 |
| WebP | 200KB | 175KB | WebP | 1179×2556 | 0.98 | 235ms | 44.2 |
| WebP | 500KB | 175KB | WebP | 1179×2556 | 0.98 | 217ms | 44.2 |
| WebP | 1MB | 175KB | WebP | 1179×2556 | 0.98 | 206ms | 44.2 |
| PNG | 100KB | 85.5KB | PNG | 300×651 | 0.98 | 51ms | 23.1 |
| PNG | 200KB | 199KB | PNG | 545×1183 | 0.98 | 89ms | 27.7 |
| PNG | 500KB | 429KB | PNG (original returned) | 1179×2556 | - | 1ms | ∞ |
| PNG | 1MB | 429KB | PNG (original returned) | 1179×2556 | - | 1ms | ∞ |
PC spreadsheet screenshot (13px text): original 283KB, 1920×1080px
| Setting | Target | Result | Output | Size (px) | Quality | Time | PSNR |
|---|---|---|---|---|---|---|---|
| Auto | 100KB | 99.4KB | WebP | 1920×1080 | 0.87 | 1.6s | 43.5 |
| Auto | 200KB | 139KB | WebP | 1920×1080 | 0.98 | 190ms | 44.6 |
| Auto | 500KB | 283KB | PNG (original returned) | 1920×1080 | - | 1ms | ∞ |
| Auto | 1MB | 283KB | PNG (original returned) | 1920×1080 | - | 1ms | ∞ |
| JPG | 100KB | 99.4KB | JPG | 1533×862 | 0.61 | 122ms | 27.1 |
| JPG | 200KB | 198KB | JPG | 1920×1080 | 0.82 | 141ms | 40.4 |
| JPG | 500KB | 336KB | JPG | 1920×1080 | 0.98 | 32ms | 45.4 |
| JPG | 1MB | 336KB | JPG | 1920×1080 | 0.98 | 21ms | 45.4 |
| WebP | 100KB | 99.4KB | WebP | 1920×1080 | 0.87 | 1.5s | 43.5 |
| WebP | 200KB | 139KB | WebP | 1920×1080 | 0.98 | 167ms | 44.6 |
| WebP | 500KB | 139KB | WebP | 1920×1080 | 0.98 | 150ms | 44.6 |
| WebP | 1MB | 139KB | WebP | 1920×1080 | 0.98 | 142ms | 44.6 |
| PNG | 100KB | 94.4KB | PNG | 731×411 | 0.98 | 73ms | 23.4 |
| PNG | 200KB | 166KB | PNG | 1017×572 | 0.98 | 49ms | 24.6 |
| PNG | 500KB | 283KB | PNG (original returned) | 1920×1080 | - | 1ms | ∞ |
| PNG | 1MB | 283KB | PNG (original returned) | 1920×1080 | - | 1ms | ∞ |
A4 scan at 300dpi: original 1.59MB, 2480×3508px
| Setting | Target | Result | Output | Size (px) | Quality | Time | PSNR |
|---|---|---|---|---|---|---|---|
| Auto | 100KB | 98.3KB | JPG | 1257×1778 | 0.65 | 354ms | 33.8 |
| Auto | 200KB | 199KB | JPG | 1778×2515 | 0.61 | 530ms | 38.4 |
| Auto | 500KB | 492KB | JPG | 2480×3508 | 0.57 | 642ms | 40.6 |
| Auto | 1MB | 773KB | JPG | 2480×3508 | 0.75 | 757ms | 43.6 |
| JPG | 100KB | 98.3KB | JPG | 1257×1778 | 0.65 | 348ms | 33.8 |
| JPG | 200KB | 199KB | JPG | 1778×2515 | 0.61 | 489ms | 38.4 |
| JPG | 500KB | 492KB | JPG | 2480×3508 | 0.57 | 666ms | 40.6 |
| JPG | 1MB | 773KB | JPG | 2480×3508 | 0.75 | 715ms | 43.6 |
| WebP | 100KB | 93.6KB | WebP | 1825×2582 | 0.73 | 6.7s | 38.3 |
| WebP | 200KB | 186KB | WebP | 2480×3508 | 0.54 | 8.7s | 39.8 |
| WebP | 500KB | 441KB | WebP | 2480×3508 | 0.75 | 10.0s | 41.0 |
| WebP | 1MB | 999KB | WebP | 2480×3508 | 0.83 | 11.3s | 43.3 |
| PNG | 100KB | 90.6KB | PNG | 211×299 | 0.98 | 354ms | 22.6 |
| PNG | 200KB | 174KB | PNG | 303×429 | 0.98 | 347ms | 23.6 |
| PNG | 500KB | 419KB | PNG | 475×671 | 0.98 | 325ms | 25.4 |
| PNG | 1MB | 843KB | PNG | 672×949 | 0.98 | 330ms | 27.9 |
Logo with transparency: original 1.84MB, 2000×2000px
| Setting | Target | Result | Output | Size (px) | Quality | Time | PSNR |
|---|---|---|---|---|---|---|---|
| Auto | 100KB | 99.9KB | WebP | 2000×2000 | 0.61 | 7.2s | 44.9 |
| Auto | 200KB | 197KB | WebP | 2000×2000 | 0.94 | 7.4s | 47.3 |
| Auto | 500KB | 260KB | WebP | 2000×2000 | 0.98 | 736ms | 47.6 |
| Auto | 1MB | 260KB | WebP | 2000×2000 | 0.98 | 788ms | 47.6 |
| JPG | 100KB | 99.7KB | JPG | 2000×2000 | 0.79 | 275ms | 43.7 |
| JPG | 200KB | 189KB | JPG | 2000×2000 | 0.94 | 252ms | 46.7 |
| JPG | 500KB | 325KB | JPG | 2000×2000 | 0.98 | 54ms | 47.4 |
| JPG | 1MB | 325KB | JPG | 2000×2000 | 0.98 | 57ms | 47.4 |
| WebP | 100KB | 99.9KB | WebP | 2000×2000 | 0.61 | 7.2s | 44.9 |
| WebP | 200KB | 197KB | WebP | 2000×2000 | 0.94 | 7.4s | 47.3 |
| WebP | 500KB | 260KB | WebP | 2000×2000 | 0.98 | 745ms | 47.6 |
| WebP | 1MB | 260KB | WebP | 2000×2000 | 0.98 | 735ms | 47.6 |
| PNG | 100KB | 81.0KB | PNG | 353×353 | 0.98 | 98ms | 34.0 |
| PNG | 200KB | 184KB | PNG | 589×589 | 0.98 | 95ms | 37.8 |
| PNG | 500KB | 378KB | PNG | 960×960 | 0.98 | 103ms | 43.8 |
| PNG | 1MB | 861KB | PNG | 1358×1358 | 0.98 | 111ms | 48.5 |
Browsers give different results
The code is the same, but the browser does the encoding. I reran a subset in the Firefox and WebKit builds that come with Playwright. At 200KB, WebKit shrank the landscape to 1232px wide where Chrome kept 1901px; its JPEG encoder seems to produce larger files at the same setting.
| Sample / target | Chrome 157.0.8103.51 | Firefox (Playwright) 155.0 | WebKit (Playwright) 26.6 |
|---|---|---|---|
| Landscape (phone camera size) 200KB | JPG 1901×1426 199KB · 681ms · PSNR 32.2 | JPG 1497×1123 197KB · 626ms · PSNR 28.6 | JPG 1232×923 193KB · 576ms · PSNR 29.6 |
| Landscape (phone camera size) 500KB | JPG 3006×2255 499KB · 902ms · PSNR 35.1 | JPG 2787×2090 500KB · 785ms · PSNR 31.9 | JPG 2293×1719 489KB · 693ms · PSNR 35.0 |
| Landscape (phone camera size) 1MB | JPG 4000×3000 992KB · 1.1s · PSNR 37.5 | JPG 4000×3000 978KB · 861ms · PSNR 34.2 | JPG 3242×2432 980KB · 1.0s · PSNR 38.7 |
| Phone chat screenshot 200KB | WebP 1179×2556 175KB · 196ms · PSNR 44.2 | WebP 1179×2556 175KB · 228ms · PSNR 44.2 | JPG 1179×2556 198KB · 267ms · PSNR 40.0 |
| PC spreadsheet screenshot (13px text) 100KB | WebP 1920×1080 99.4KB · 1.6s · PSNR 43.5 | WebP 1920×1080 97.7KB · 1.6s · PSNR 43.5 | JPG 1249×702 99.4KB · 172ms · PSNR 26.2 |
| A4 scan at 300dpi 200KB | JPG 1778×2515 199KB · 516ms · PSNR 38.4 | JPG 1597×2260 196KB · 472ms · PSNR 37.3 | JPG 1004×1421 200KB · 354ms · PSNR 32.3 |
| Logo with transparency 100KB | WebP 2000×2000 99.9KB · 7.5s · PSNR 44.9 | WebP 2000×2000 99.5KB · 10.9s · PSNR 44.7 | PNG 437×437 92.9KB · 272ms · PSNR 35.3 |
| Logo with transparency 200KB | WebP 2000×2000 197KB · 7.7s · PSNR 47.3 | WebP 2000×2000 200KB · 11.5s · PSNR 47.2 | PNG 595×595 162KB · 246ms · PSNR 37.8 |
WebKit cannot encode WebP. Before a fix made during these tests, Auto fell back to PNG there, which cut a 200KB phone screenshot to 617px wide. Images without transparency now fall back to JPEG instead and keep their width, as the table shows. Playwright’s WebKit is not the same as Safari on an iPhone, so I cannot promise identical numbers on a phone.
What this does not show
All runs were on one laptop; phones will be slower. The samples are synthetic and do not represent an average compression ratio. PSNR does not always match what your eyes see, so check the crops as well. If you get very different results, send me your browser, device and file size and I will try the same conditions.