Choosing WebP Conversion Settings
Putting original photos straight onto a web page makes it heavy and slow to load. A smartphone photo is 3-6 MB, while most layouts need at most 1600px of width. Resizing plus format conversion usually cuts file size to a fifth or less.
Picking a Format
WebP (a modern image format with smaller files) is roughly 25-35% smaller than JPEG at comparable quality and is supported by all major browsers today. Use WebP or JPEG for photos, and PNG for screenshots with sharp lines or images that need transparency. PNG is lossless, so the quality setting does not apply, but files stay large.
Quality and Max Width
For photos, quality between 75 and 85 is visually hard to distinguish from higher settings. Inline article images rarely need more than 1200-1600px of width, and thumbnails work well at 320-640px. Never upscale beyond the original size; it only degrades quality.
The resize and WebP converter on the image tools page applies exactly these rules. Files are never uploaded: conversion happens with the browser's built-in canvas feature and results are offered as direct download links. Original files are left untouched.
Things to Check Before Converting
Conversion strips EXIF metadata such as capture time and GPS location. That is a plus for public images, but keep a backup if you need the shooting data. Also note that JPEG has no transparency, so converting a transparent PNG to JPEG fills the background with white.
Converting With cwebp
Once you have settled the rules, conversion is one cwebp line — resize and quality together.
# 0) install cwebp (Ubuntu/Debian)
sudo apt install -y webp
# on macOS: brew install webp
# verify: cwebp -version → a number means OK
# 1) one photo: quality 80 + downscale to 1600px wide
cwebp -q 80 -resize 1600 0 photo.jpg -o photo.webp
# -resize 1600 0 → width 1600, height 0 = "auto by ratio"
# → "Saved ... bytes" means photo.webp was created
# 2) convert every .jpg in the folder
for f in *.jpg; do
cwebp -q 80 -resize 1600 0 "$f" -o "${f%.jpg}.webp"
done
# 3) screenshots/logos where text must stay crisp: lossless
cwebp -lossless logo.png -o logo.webp