How to Compress Images Without Losing Quality
What I actually do to shrink listing photos without wrecking them—settings, tools, and the gotchas that slowed my pages down.
What I actually do to shrink listing photos without wrecking them—settings, tools, and the gotchas that slowed my pages down.

How to Compress Images Without Losing Quality
I was trying to ship a real estate landing page, but the hero slider took 5–6 seconds to paint on mobile. The culprit: 8MB photos straight from a DSLR. Here’s the exact workflow I use now to keep images sharp while slashing weight.
How I tested
- Devices: 2021 M1 MacBook Pro + iPhone 14 on LTE
- Assets: 12 listing photos (8–12MB JPGs), 3 logo/overlay PNGs with transparency
- Goal: cut total weight by 70% while keeping text/edges crisp on Retina displays
Resize, then compress
convert input.jpg -resize 1600x -strip output.jpg (ImageMagick)Export to WebP when possible
cwebp output.jpg -q 70 -o output.webp<picture> element for older browsers.Batch with a tiny Python helper (Pillow)
from pathlib import Path
from PIL import Image
def compress(path: Path, max_width=1600, quality=78):
img = Image.open(path)
if img.width > max_width:
height = int(img.height * max_width / img.width)
img = img.resize((max_width, height), Image.LANCZOS)
params = {"optimize": True, "quality": quality}
out = path.with_name(f"{path.stem}_compressed{path.suffix}")
img.save(out, **params)
return out
for file in Path("photos").glob("*.jpg"):
print(compress(file))
<picture> or srcset so phones aren’t forced to download desktop-width assets.If you only do one thing: resize to the largest real display width and export at WebP quality ~70. That alone usually cuts 50–70% without anyone noticing.
Try our free, browser-based conversion tools. Lightning-fast, secure, and no registration required.
Browse All Tools**Option 1 (Concise & Benefit-Oriented):**> Optimize your website! Discover the best image formats (PNG, JPG, WebP) for 2025. Improve speed & quality. Read now!**Option 2 (Focus on Performance):**> Faster loading? Choose the right image formats. PNG, JPG, or WebP? Our 2025 guide boosts website performance. Learn which is best!
Step-by-step Cloudflare & BunnyCDN setup to cut page loads up to 60%. Plus free browser image compression — no signup, no upload.