Image Compression 8 min read

How to Shrink JPEG File Size

Reduce JPEG file size by 60-90% using quality optimization, EXIF stripping, and modern formats like WebP. Free tools and expert techniques.

Difficulty Easy
Compression 60-90%
Time Required 2-5 minutes

Understanding JPEG Compression

JPEG uses lossy compression—it permanently discards image data to reduce file size. The key is finding the threshold where compression is invisible to the human eye.

Key insight: Most cameras and phones save JPEGs at 90-100% quality. This is overkill. Reducing to 70-85% quality produces files 60-80% smaller with imperceptible quality loss.

Why JPEG Files Are Large

  • Unnecessary quality: Default camera quality (90-100%) far exceeds what's needed for viewing
  • EXIF metadata: GPS, camera settings, thumbnails can add 100-500 KB per image
  • High resolution: Modern cameras shoot 12-50 megapixels; most uses need 2-8 megapixels
  • Unoptimized encoding: Quick camera encoding prioritizes speed over file size
Quality %File SizeVisual QualityBest Use
90-100 Very Large Pixel-perfect Professional printing, archival
80-90 Large Excellent High-quality prints, portfolios
70-80 Medium Very good Recommended for web/sharing
60-70 Small Good Web thumbnails, social media
Below 60 Very Small Poor Avoid unless desperate

Quality Settings: Finding the Sweet Spot

The "quality" parameter controls how much detail JPEG preserves. Here's how to choose the right value:

For web display: Quality 70-80

Strikes perfect balance between size and quality. File size 60-70% smaller than original with imperceptible loss.

For thumbnails/previews: Quality 60-70

Visible at full size but fine for small previews. Files 70-80% smaller.

For printing: Quality 85-90

Maintains detail for physical prints. Only 30-50% smaller but safe for 8×10" prints.

Compression artifacts to watch for: At quality below 60, you'll see "blocky" 8×8 pixel squares, color banding, and loss of fine detail. Test with a sample before batch-processing.

Method 1: Online Compression Tools

Fast, free, no software installation required. Perfect for one-off compressions.

1

TinyJPG (Recommended)

URL: tinyjpg.com

  • Method: Smart lossy compression
  • Typical reduction: 60-80%
  • Free limit: 20 images at once, 5 MB max each
  • Quality: Excellent—uses perceptual optimization

How to use: Drag and drop images, wait for compression, download. That's it.

TinyJPG Results:

  • 3.2 MB photo → 680 KB (79% reduction)
  • 1.8 MB screenshot → 420 KB (77% reduction)
  • Quality: Indistinguishable from original on screen
2

Squoosh.app (Google)

URL: squoosh.app

  • Method: Real-time preview with quality slider
  • Formats: JPEG, WebP, AVIF, MozJPEG
  • Free limit: Unlimited, processes locally in browser
  • Best feature: Side-by-side before/after comparison

How to use:

  1. Upload image
  2. Drag the slider to compare original vs compressed
  3. Adjust quality setting until you can't see difference
  4. Download compressed image
Pro tip: Use Squoosh's MozJPEG encoder instead of standard JPEG—same quality, 5-10% smaller files.
3

Compressor.io

URL: compressor.io

  • Method: Lossy and lossless modes
  • Typical reduction: 50-70% (lossy), 10-20% (lossless)
  • Free limit: Unlimited
  • Best for: Quick compressions without quality concerns
Privacy note: Online tools upload your images to their servers. Don't use them for private/sensitive photos. For local processing, use desktop software or command-line tools.

Method 2: Desktop Software

Mac: Preview (Built-in)

Steps:

  1. Open image in Preview
  2. File → Export
  3. Format: JPEG
  4. Quality slider: Drag to 70-80%
  5. Click Save

Tip: Check "Export" file size before saving. Preview shows estimate in save dialog.

Windows: Paint / Paint 3D

Steps:

  1. Open image in Paint
  2. File → Save As → JPEG
  3. Click "Quality" dropdown (if available)
  4. Select lower quality (70-80)

Limitation: Paint doesn't offer fine quality control. For better control, use IrfanView (free) or GIMP (free, open-source).

GIMP (Free, Cross-Platform)

Steps:

  1. Open image in GIMP
  2. File → Export As
  3. Change extension to .jpg
  4. In export dialog, set Quality to 70-85
  5. Uncheck "Save thumbnail" and "Save EXIF data"
  6. Click Export

Advanced: Use Image → Scale Image to resize before exporting for even smaller files.

JPEGmini (Paid, $20)

  • Method: AI-powered perceptual compression
  • Reduction: Up to 80% with excellent quality
  • Batch processing: Drag entire folders
  • Best for: Photographers processing hundreds of images

URL: jpegmini.com

Method 3: Command Line (ImageMagick)

For batch processing and automation, ImageMagick is the gold standard.

1

Install ImageMagick

# macOS brew install imagemagick # Ubuntu/Debian sudo apt install imagemagick # Windows (download from imagemagick.org)
2

Basic Compression

# Compress single image to quality 80 convert input.jpg -quality 80 output.jpg # Strip EXIF and compress convert input.jpg -strip -quality 75 output.jpg # Resize and compress convert input.jpg -resize 1920x1080 -quality 80 output.jpg
3

Batch Process Entire Folder

# Compress all JPEGs in current directory for file in *.jpg; do convert "$file" -quality 75 -strip "compressed_$file" done # Create 'compressed' subfolder and process mkdir compressed for file in *.jpg; do convert "$file" -quality 80 -strip "compressed/$file" done
4

Advanced: Optimize for Web

# Full web optimization convert input.jpg \ -strip \ -interlace Plane \ -gaussian-blur 0.05 \ -quality 80 \ output.jpg

What this does: -strip removes metadata, -interlace Plane creates progressive JPEG (loads faster on web), -gaussian-blur 0.05 subtle blur hides compression artifacts

Stripping EXIF Metadata

EXIF data includes camera settings, GPS location, timestamps, and thumbnails. It can add 100-500 KB per image without affecting visual quality.

Privacy warning: EXIF often includes GPS coordinates showing exactly where photo was taken. Always strip EXIF before sharing photos online.

What EXIF Contains:

  • Camera info: Make, model, lens, settings
  • GPS location: Exact latitude/longitude (if phone/camera has GPS)
  • Timestamp: When photo was taken
  • Thumbnail: Small preview image embedded in file
  • Software: Editing apps used

How to Strip EXIF:

Online: EXIF Remover

URL: exifremove.com

Upload image, download cleaned version. Simple and fast.

Mac: Preview

Tools → Show Inspector → (i) tab → click "Remove Location Info" or manually delete fields

Command Line: exiftool

# Install exiftool brew install exiftool # macOS # Remove all EXIF exiftool -all= image.jpg # Batch remove from folder exiftool -all= *.jpg

EXIF Stripping Results:

  • iPhone photo: 3.2 MB → 2.8 MB (400 KB saved, 12.5% reduction)
  • DSLR photo: 8.1 MB → 7.6 MB (500 KB saved, 6% reduction)
  • Bonus: Privacy protected, no location data exposed

Converting JPEG to WebP

WebP is Google's modern image format. It offers 25-35% smaller files than JPEG at the same visual quality.

FeatureJPEGWebP
File Size Baseline 25-35% smaller
Quality Good Equal or better
Browser Support 100% 96% (all modern browsers)
Transparency No Yes (alpha channel)

Convert to WebP (Command Line)

# Install WebP tools brew install webp # macOS sudo apt install webp # Ubuntu # Convert JPEG to WebP (quality 80) cwebp -q 80 input.jpg -o output.webp # Batch convert for file in *.jpg; do cwebp -q 80 "$file" -o "${file%.jpg}.webp" done

Convert with Squoosh (Online)

Go to squoosh.app, upload JPEG, change output format to WebP, adjust quality slider, download.

When to use WebP: Perfect for websites and web apps. Avoid for sharing on social media or with non-tech users (compatibility issues).

Real-World Compression Examples

Example 1: iPhone Portrait Photo

Original 4.2 MB 4032×3024, Quality 95
Optimized 580 KB 86% reduction

Method: TinyJPG online compressor

Changes: Quality reduced to ~75, EXIF stripped

Quality: Indistinguishable on phone/laptop screens

Example 2: DSLR Landscape

Original 12.8 MB 6000×4000, Quality 100
Web-Optimized 890 KB 93% reduction

Method: ImageMagick: resize to 1920px width, quality 80, strip EXIF

Changes: Resized for web, EXIF removed, quality optimized

Quality: Perfect for web display, still sharp at full-screen

Example 3: Screenshot

Original PNG 2.1 MB 2560×1440
JPEG Quality 85 380 KB 82% reduction

Method: Convert PNG to JPEG with quality 85

Changes: Format conversion (PNG → JPEG)

Quality: Text remains readable, minor smoothing in gradients

Frequently Asked Questions

What is the best quality setting for JPEGs?

It depends on your use case:

  • Web/email sharing: Quality 70-80 (sweet spot for size/quality)
  • Professional printing: Quality 85-95
  • Thumbnails: Quality 60-70
  • Archival: Quality 90-95 or use lossless formats (PNG, TIFF)

General rule: Start at 80, reduce until you notice quality loss, then increase by 5.

Will compressing a JPEG multiple times degrade quality?

Yes. Each time you save a JPEG (even at the same quality setting), it applies lossy compression again. This creates generation loss—artifacts accumulate and quality degrades.

Best practice: Always edit from the original high-quality file. Never re-compress an already-compressed JPEG.

Should I resize images before compressing?

Yes, if the image is larger than needed. Resolution has massive impact on file size:

  • 4K (3840×2160) → 1080p (1920×1080) = 75% size reduction
  • 1080p → 720p (1280×720) = 55% size reduction

Recommended max widths:

  • Social media: 1920px
  • Email: 1280px
  • Thumbnails: 300-600px
Is WebP better than JPEG?

Yes, for file size. WebP offers 25-35% smaller files at the same quality. However:

Use WebP for:

  • Websites and web apps
  • Modern email newsletters
  • Apps with WebP support

Use JPEG for:

  • Universal compatibility (older devices/software)
  • Sharing on social media
  • Printing
How do I compress images without losing quality?

True lossless compression: Use PNG optimization (OptiPNG, pngquant) or convert to WebP lossless mode. File size reduction is limited (10-30%).

Visually lossless JPEG compression: Use quality 85-90. File size reduction is 40-60% with imperceptible quality loss to human eyes.

Recommendation: For photos, JPEG at quality 80-85 is the best balance. For graphics/text, use PNG or WebP.

What's the difference between JPEG and JPG?

No difference. They're the same format. ".jpg" exists because old Windows systems required 3-letter file extensions. Modern systems accept both. Use whichever you prefer.

How can I compress JPEGs in bulk?

Online: TinyJPG allows 20 images at once. Smallpdf and Compressor.io support batch uploads.

Desktop: JPEGmini (paid), GIMP with batch plugin, or XnConvert (free).

Command line: ImageMagick with a loop (see Method 3 above) or use mogrify:

# Compress all JPEGs in place mogrify -quality 80 -strip *.jpg
Does stripping EXIF data reduce quality?

No. EXIF is metadata (text information) stored alongside the image data. Removing it has zero impact on visual quality. It only reduces file size and protects your privacy.

What you lose: Camera settings, timestamps, GPS location (often desirable to remove for privacy).