How to Decrease the File Size of a JPEG: A Practical Guide

JPEG files can balloon in size quickly — a single photo from a modern smartphone camera can easily hit 5–10 MB. That's fine for archiving, but it creates real problems when uploading to websites, sharing by email, or storing hundreds of images on a limited drive. The good news is that reducing JPEG file size is straightforward once you understand what's actually happening inside the file.

What Determines the Size of a JPEG File?

A JPEG isn't a raw snapshot of every pixel. It uses lossy compression — a mathematical process that discards visual information the human eye is unlikely to notice. The final file size depends on several interacting factors:

  • Image dimensions — A 4000×3000 pixel image contains far more data than a 1200×900 version of the same photo
  • Compression quality setting — JPEG quality is typically expressed on a scale of 0–100; higher quality means less compression and larger files
  • Image content — Photos with lots of fine detail, texture, or noise compress less efficiently than simple, smooth images
  • Embedded metadata — EXIF data (camera model, GPS coordinates, timestamps) adds overhead that's invisible in the image but present in the file
  • Color profile — Embedded ICC color profiles can add kilobytes to every file

Understanding these levers is the key to making informed size reductions.

The Two Core Approaches: Resizing vs. Recompressing

These are often confused, but they work differently and suit different goals.

Resizing reduces the pixel dimensions of the image. If you only need a photo for a website thumbnail or email preview, dropping from 4000px wide to 800px wide can reduce file size by 80–90% before any other changes. Resizing is irreversible — you can't recover the original resolution from a downsized file.

Recompressing keeps the pixel dimensions the same but applies stronger JPEG compression. A quality setting of 85 often produces files 40–60% smaller than quality 100 with minimal visible degradation. Push below quality 60 and blocky artifacts typically become visible, especially around edges and text.

Most practical workflows use both together — right-size the dimensions for the intended output, then compress to an appropriate quality level.

Tools You Can Use

There's no single right tool. Options exist across every platform and skill level:

Tool TypeExamplesBest For
Desktop softwarePhotoshop, GIMP, Preview (macOS)Precise control, batch editing
Online toolsSquoosh, TinyJPEG, iLoveIMGQuick one-off conversions
Command-lineImageMagick, jpegoptimAutomation, bulk processing
Mobile appsSnapseed, Image SizeOn-device compression
CMS pluginsWordPress Smush, ShortPixelWeb publishing workflows

Each approach gives you different levels of control. Command-line tools like jpegoptim and ImageMagick allow precise quality targets and lossless metadata stripping — valuable for developers processing hundreds of files. Online tools like Squoosh show a real-time before/after comparison, making them ideal for visual judgment calls.

Lossless Optimization: The Often-Overlooked Option 🔍

Not every size reduction requires throwing away image data. Lossless JPEG optimization strips unnecessary metadata and reorganizes the file's internal structure without touching a single pixel. Tools like jpegoptim with the --strip-all flag or ExifTool can shave 10–30% off file sizes this way.

This is particularly useful when:

  • You need to preserve full image quality (product photography, print files)
  • Images contain sensitive location data you want removed anyway
  • You're optimizing files that have already been compressed and re-saving would cause further quality loss

Quality Settings: A Practical Reference

While exact results vary by image content, these quality ranges hold generally across most JPEG encoders:

  • Quality 90–100: Near-lossless; file sizes remain large; suited for archiving or print
  • Quality 75–85: The standard web sweet spot — visually clean, meaningfully smaller files
  • Quality 60–74: Noticeably smaller; some artifacts appear in high-detail areas
  • Quality below 60: Significant quality loss; usable only for thumbnails or previews where quality is secondary

Most web platforms and content management systems recommend targeting 150–200 KB for general-purpose images, though that ceiling shifts depending on image dimensions and display context.

What Changes When You Resave a JPEG

One important behavior to understand: every time you open and resave a JPEG at less than 100% quality, compression is applied again. This is cumulative. An image resaved five times at quality 80 will look noticeably worse than one saved once at quality 80. To avoid generation loss, always work from the original file and export a compressed copy — never overwrite your source.

If you're making repeated edits, work in a lossless format like PNG or TIFF and export to JPEG only at the final step.

Factors That Make This Different for Every User 🖥️

The right balance between file size and quality isn't universal — it shifts based on your situation:

  • Website owners have to weigh image quality against page load speed and Core Web Vitals scores
  • Email users are often constrained by attachment limits (commonly 10–25 MB per message)
  • Photographers may need to preserve maximum quality for client delivery while compressing preview files separately
  • Developers automating image pipelines have different tooling and precision requirements than someone compressing a single photo
  • Mobile users may face storage limits that make aggressive compression worthwhile even at some quality cost

The compression setting that works well for a product image on an e-commerce site might be completely wrong for a printed wedding album or a medical imaging workflow. Even within web use, a hero banner viewed at full width demands different treatment than a small author avatar.

Your specific output destination, audience expectations, storage constraints, and how the image will be displayed all factor into what "good enough" actually means for your files.