Krunkit

Optimize WebP

Re-encode WebP images with optimized compression. Get smaller files instantly.

Drop images here or click to browse (up to 10)

JPEG, PNG, WebP, AVIF up to 50MB each

WebP Optimization Guide

Re-encoding

Re-encodes your WebP with optimal compression settings for smaller output.

Quality Slider

Adjust quality to find the perfect balance of size and visual fidelity.

Typical Savings

10-25% size reduction at the same visual quality.

Already Small?

Well-optimized WebP files may see smaller reductions. Every bit counts!

Tuning libwebp: Advanced WebP Optimization Beyond Default Settings

Krunkit's WebP optimization uses libwebp, Google's reference encoder, which exposes granular controls that most conversion tools hide behind simple quality sliders. The encoder's 'method' parameter (0-6) controls the compression thoroughness — method 0 is fastest but least efficient, while method 6 spends 5-10x longer finding optimal block partitioning and transform coding decisions. The default method 4 represents a reasonable balance, but method 6 can squeeze an additional 3-8% from files where loading speed matters more than conversion time.

WebP's lossy compression uses a block prediction system derived from the VP8 video codec, dividing images into 16x16 macroblocks with optional 4x4 sub-partitioning. For photographic content, the encoder selects from four prediction modes (DC, horizontal, vertical, TrueMotion) for each block. Optimizing WebP involves letting the encoder evaluate more prediction modes per block — controlled by the 'partitions' and 'segments' settings — which increases compression efficiency at the cost of encoding time. This is particularly effective for images with varied textures.

WebP lossless optimization uses a distinct set of techniques including predictive coding with 13 different spatial prediction modes, backward reference search, color cache, and Huffman coding. The lossless encoder's quality parameter (0-100) does not affect visual quality — since it is lossless, every pixel is preserved. Instead, it controls the encoding effort: higher values produce smaller files by spending more time searching for optimal backward references and testing more prediction mode combinations.

One overlooked optimization opportunity is WebP's near-lossless mode, which allows a quality parameter of 95-99 to introduce imperceptible modifications (adjusting the least significant bit of pixel values) that dramatically improve compression. A screenshot that compresses to 400 KB in WebP lossless can drop to 250 KB in near-lossless at quality 98, with differences invisible to the human eye even at 300% zoom. This mode is ideal for technical screenshots, documentation images, and UI mockups.

Pro Tips

  • Use near-lossless mode (quality 98) for screenshots and technical images

    Near-lossless WebP at quality 98 produces files 30-40% smaller than fully lossless WebP with pixel differences invisible even under magnification. This is the optimal mode for documentation screenshots, tutorial images, and code editor captures where visual fidelity matters but mathematical perfection is unnecessary.

  • Increase encoding method to 6 for static assets served millions of times

    Method 6 takes 5-10x longer to encode but produces files 3-8% smaller than method 4. For a hero image served 100,000 times daily, spending 5 extra seconds during build time saves gigabytes of monthly bandwidth. The math strongly favors maximum compression for high-traffic assets.

  • Re-optimize WebP files exported by other tools

    Many image editors and CMS plugins use libwebp at default settings (method 4, no advanced tuning). Re-encoding through Krunkit with method 6 and optimized spatial prediction often shaves an additional 5-12% from these already-converted files. For image-heavy sites, this second-pass optimization adds up quickly.

Frequently Asked Questions

Can WebP files be further optimized?

Yes. Re-encoding with optimized settings can reduce file size by 10-25%, especially for WebP files created with suboptimal settings.

Is there quality loss?

WebP optimization involves re-encoding, which can have minor quality impact. At quality 80+ the difference is imperceptible.

Why optimize if WebP is already efficient?

Not all WebP encoders are equal. Our optimized encoder may find better compression for your specific images.

How does this work?

The image is decoded and re-encoded with optimized WebP compression settings, all in your browser.