Convert PNG to WebP on Windows
Convert PNG to WebP on Windows with cwebp or GetCompress. Keep a JPEG fallback for older browsers.
That hero PNG is 1.8 MB but displays at 960 px wide on the page. WebP often cuts weight sharply when you resize first and pick a sensible quality level. Modern browsers load WebP efficiently; older ones still need a JPEG or PNG fallback in your HTML. Treat WebP as the optimized primary asset, not the only asset you ship. Lighthouse and Core Web Vitals reward smaller heroes, but accessibility and email workflows still expect a JPEG or PNG path you can attach without conversion.
Why WebP for websites
WebP supports lossy and lossless modes. For marketing heroes and blog figures exported as PNG from design tools, lossy WebP at quality 80 to 85 is usually enough.
| Format | Role on the site |
|---|---|
| WebP | Primary delivery for supporting browsers |
| JPEG or PNG | Fallback in <picture> or server rules |
| AVIF | Optional next step for even smaller heroes |
Ship fallback assets in HTML. Do not rely on WebP alone unless analytics confirm your audience browsers.
Designers export PNG from Figma; developers convert before deploy. Paint does not export WebP, so conversion happens in PowerShell or a dedicated app.
Measure before and after on one hero image with your browser network panel. A 40% byte drop on a 1.8 MB PNG is common when you resize to CSS width first.
The display-size rule for WebP
Oversized PNG in produces oversized WebP out. Match export width to CSS layout.
| CSS display width | Export width (2x screens) |
|---|---|
| 480 px column | 960 px |
| 960 px hero | 1920 px |
| Full-bleed 1440 px layout | 2880 px max (often 1920 is enough) |
A 4000 px PNG converted to WebP without resize still punishes mobile Lighthouse scores. Resize in Photos or during conversion with cwebp -resize.
Check one output on a phone and a high-DPI laptop before you batch the whole asset folder.
Hero images with dark gradients show banding first. If banding appears at quality 80, try 85 on those files only while keeping 80 on flat UI screenshots.
Convert with cwebp
Open Command Prompt or PowerShell. Install webp tools with winget:
winget install webp
cwebp -q 85 hero.png -o hero.webp
cwebp -q 85 -resize 1920 0 hero.png -o hero-1920.webp
Batch every PNG in a folder:
Get-ChildItem *.png | ForEach-Object {
cwebp -q 85 $_.Name -o "$($_.BaseName).webp"
}
| Flag | Plain meaning |
|---|---|
-q 85 | Quality (try 80 to 90 for heroes) |
-resize 1920 0 | Max width 1920 px, height scales |
-lossless | Larger files; use only for UI with flat colors |
If stakeholders still need JPEG for email or legacy CMS fields, see PNG to JPG on Windows for the non-WebP path.
cwebp is script-friendly. It does not preview output or remember project presets across repos.
See how to compress images on Windows when the deploy folder mixes JPEG, PNG, and WebP alongside heroes you optimize again before release.
Resize in Photos first
When you already resized in the design tool, skip this step. When the PNG is full canvas export:
- Open in Photos.
- Choose … → Resize image to the width your CSS uses (times 2 for high-DPI if needed).
- Run cwebp on the resized file.
Paint also works: Resize, save a copy, then convert with cwebp.
Resize before lossy conversion. Re-running cwebp at lower quality on an oversized source wastes visual budget on pixels nobody sees.
Save resized copies to a resized\ folder so you keep the original PNG from design untouched.
Run cwebp from a PowerShell script or CI step in your static site repo so designers only drop PNG files into assets\src\ and the pipeline emits WebP before deploy.
Compare byte size of WebP and fallback JPEG in the network panel after deploy. If savings are under 15%, revisit resize width before you lower quality further.
Regenerate WebP when the source PNG changes in design. Stale WebP files with old filenames are a common reason hero images look soft after a rebrand.
Using GetCompress
GetCompress convert PNG to WebP on Windows without installing cwebp or maintaining PowerShell loops in each repo.
- Drop PNG exports into GetCompress, choose WebP output, set quality and max width, and export before deploy.
- Preview heroes and UI crops when banding or text softness would show on dark backgrounds.
- Save a preset per site (for example “marketing WebP 1920 q85”) for repeat releases.
- Batch an entire
assets/folder when design hands off twenty PNG figures at once. - Process locally when previews contain unreleased product UI.
Keep a JPEG or PNG fallback in site markup for browsers that skip WebP. GetCompress does not replace your <picture> element; it produces the optimized WebP files that slot into it. For reverse conversion when a client asks for JPEG, see WebP to JPG on Windows .
If stakeholders still need JPEG for email or legacy CMS fields, see PNG to JPG on Windows for the non-WebP path.
Store WebP and fallback assets in parallel folders (webp\ and fallback\) so deploy scripts never pick up the wrong file extension.
Commit both fallback and WebP paths in the same deploy so CI uploads stay in sync.
Document the quality and max-width preset in your repo README so the next release uses the same WebP settings as the last launch page.
- Convert WebP to JPG on WindowsConvert WebP to JPG on Windows with Paint, FFmpeg, or GetCompress. For email attachments and apps that only accept JPEG.
- Convert JPG to AVIF on WindowsConvert JPG to AVIF on Windows with avifenc or GetCompress. Use JPEG fallback in your HTML.
- For web developersBuild a repeatable PNG, JPEG, WebP, AVIF, MP4, and WebM asset pipeline that improves page weight without breaking responsive delivery or visual quality.
- Convert CR2 to JPG on WindowsConvert Canon CR2 to JPEG on Windows with Photos or Lightroom. Keep RAW masters; export JPG for clients.
Buy GetCompress now for local media compression with reusable presets and no media upload.