← All features
engineering

Image compression pipeline

Phone photos that do not pixelate — and do not eat your disk.

Every image upload goes through Pillow before it touches storage. EXIF rotation first, strip EXIF metadata, Lanczos downscale to 1920 px, JPEG quality 85, progressive. Typical 4 MB phone photo → ~740 KB stored.

  • EXIF-based rotation (portrait phone shots land upright)
  • EXIF stripped for privacy
  • Lanczos resampling — high-quality downscale, no pixellation
  • 480 px thumbnail generated for gallery grids

How it works

services/storage.compress_image runs on every upload. Non-images pass through untouched. PNGs with transparency stay PNG (logos/stamps).

Upload a 4 MB JPEG; we serve back 800 KB.

More engineering features