Converting PNG to WebP: Why Every Website Owner Should Do It
PNG files are 3–5× larger than their WebP equivalents. How to migrate your image library, what to watch out for, and when to keep PNG.
PNG became the default format for web graphics in the 2000s — lossless compression, alpha transparency, wide support. It was a good choice then. But it was designed before Lighthouse scores, Core Web Vitals, and 4G mobile connections. In 2026, serving PNG where WebP would do is leaving measurable performance improvement untouched.
The Size Difference Is Significant
For photographic content: a JPEG converted to PNG is typically 3–5× larger. Converting that PNG to lossy WebP (quality 80) gives you a file smaller than the original JPEG, at equivalent or better visual quality.
For graphics with transparency (icons, illustrations): PNG lossless typically runs 20–40% larger than WebP lossless. Lossy WebP with alpha transparency achieves 40–70% size reduction with minimal visible impact on non-photographic content.
When to Use WebP vs. Keeping PNG
- ●Switch to WebP: hero images, product photos, thumbnails, blog post images, banners
- ●Consider PNG: icons and logos that require sub-pixel precision (lossy WebP softens edges)
- ●Keep PNG: screenshots where pixel-exact rendering matters
- ●Use SVG instead: logos, icons, and any vector content — SVG beats both formats
Migration: Batch Convert with cwebp
# Install: brew install webp (macOS) / apt install webp (Ubuntu)
# Lossy WebP for photographic PNGs
for f in images/*.png; do
cwebp -q 80 "$f" -o "\${f%.png}.webp"
done
# Lossless WebP for graphics and icons
for f in icons/*.png; do
cwebp -lossless "$f" -o "\${f%.png}.webp"
done
# Compare sizes
du -sh images/*.png images/*.webp | sort -hNext.js, Nuxt, and most modern frameworks automatically serve WebP via their Image components when the browser supports it — without any code changes. Enabling the Image component is the easiest migration path.
Measuring the Impact
Run PageSpeed Insights before and after. Switching from PNG to WebP on image-heavy pages typically moves the "Efficiently encode images" audit from red to green and adds 10–30 points to Performance score.
Start with the quick wins: convert your images to WebP and compare the file sizes before committing to a full site migration.
Ready to try it?
All tools run entirely in your browser — no uploads, no account required.
Convert Image to WebP