Text compresses; images already did
HTML, CSS and JavaScript shrink to roughly a quarter of their size inside an Android package. Images do not shrink at all — they are already compressed — so they arrive at full weight. A site's images usually explain the entire gap between a 5 MB app and a 30 MB one.
WebP is the cheapest fix. Android has decoded it since 4.0, every current browser reads it, and it typically comes out 25–35% smaller than JPEG and much smaller than PNG at the same visual quality.
Expected savings
| Input | Typical saving | Note |
|---|---|---|
| JPEG photograph | 25–35% | The headline case |
| PNG screenshot | 40–70% | Frequently dramatic |
| PNG with alpha | 30–60% | Transparency is preserved |
| Tiny flat icon | 0% or negative | Container overhead wins — keep the PNG |
| Already WebP | None | Re-encoding only loses quality |
Files that grew are flagged rather than silently handed back. For a small logo or flat icon, PNG often wins, and shipping a mix is fine.
Resize before you compress
The most common waste in a bundled app is a 4000 px photograph displayed in a 400 px card — a hundred times the pixels anyone sees, and no quality slider recovers that. Decide the largest size each image is shown at, double it for high-density screens, and resize to that: 1920 px for a hero, around 800 px for cards, covers nearly every phone. Doing that first and then converting takes megabytes off — far more than the quality setting ever will.
Picking a quality
82 is preselected because it is a good default. Under about 70, artifacts appear on gradients and skin; above 95, size climbs for differences invisible on a phone. Fine text or diagrams: try 90 and inspect. Photographs: 80–85 is indistinguishable from the original.
Using the output
In a bundled app, replace the files and update the references — no fallback needed, since every Android version with a modern WebView decodes WebP. On the open web, keep one for very old browsers:
<picture> <source srcset="hero.webp" type="image/webp"> <img src="hero.jpg" alt="…"> </picture>
What happens to the files
Encoding uses the browser's own WebP encoder through a canvas. Everything stays on your machine, which suits unreleased artwork — and metadata is stripped: EXIF, colour profiles and copyright tags do not survive the canvas. For app assets that is usually welcome (no camera or location data shipped by accident); for photography where authorship matters, use a tool that preserves it. Afterwards, run the folder through the app size estimator to see the new total.