{
  "id": 9978782,
  "title": "Your PNG quality slider does nothing — I measured canvas.toBlob() for PNG, JPEG and WebP",
  "url": "https://urgent.news/2026/09/26/your-png-quality-slider-does-nothing-i-measured-canvas-toblob-for-png",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-26T12:38:20.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/sharefun2023/your-png-quality-slider-does-nothing-i-measured-canvastoblob-for-png-jpeg-and-webp-7l2"
  },
  "original_language": "en",
  "account": "A recent investigation into the functionality of the quality slider found on many web-based image tools revealed two significant issues. Utilizing a headless Chrome browser and a 1200×800 canvas filled with a photo-like gradient, noise rectangles, and monospace text, the test measured the output of canvas.toBlob() across different formats and quality settings.\n\nThe first finding demonstrated that PNG format, which is a lossless format, does not respond to the quality argument at all. Regardless of the quality value set (0.1 or 1.0), the output size remained constant at 1,345,909 bytes. This is because PNG has no concept of quantization target, which is the primary purpose of the quality argument in lossy formats like JPEG and WebP. As a result, any representation claiming that setting the PNG quality slider to a specific value will result in significant file size reductions is inaccurate.\n\nThe second finding showed that WebP consistently outperformed JPEG across all tested quality settings. For instance, when compared to JPEG, WebP achieved half the file size at a quality setting of 1.0 (477,822 bytes vs. 962,887 bytes). At lower quality settings, the size differences became even more pronounced. At a quality of 0.1, WebP's file size was 12,124 bytes compared to JPEG's 1,212,4 bytes, marking a 98.7% reduction in file size for WebP.\n\nThese findings challenge the common belief that adjusting the quality slider on an image tool would result in noticeable file size reductions, particularly for PNG format. Instead, the investigation highlights that significant file size reductions are more effectively achieved by utilizing formats like WebP or JPEG with reduced quality settings. Additionally, the investigation underscores the importance of considering the source-dependent nature of compression algorithms, as well as the fact that setting the quality slider to its maximum value does not guarantee optimal compression, especially for PNG format.",
  "summary": "Every image tool on the web has a \"quality\" slider. Almost nobody tells you which formats actually obey it. I build client-side image tools, so the slider isn't cosmetic for me — it's the whole feature. I sat down with a headless Chrome and measured what canvas.toBlob() really does with that argument, format by format. Here are the raw numbers, and the two places where the mental model everyone…",
  "key_points": [
    "PNG quality slider does not affect file size, remains constant at 1,345,909 bytes",
    "WebP achieves significant file size reduction compared to JPEG, up to 98.7%",
    "Maximum quality setting does not guarantee optimal compression for PNG format"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}