← All articles

How to Reduce Image Size: 5 Methods That Actually Work

Large images slow down websites, bounce off email servers, and choke upload forms. The fix is straightforward once you know which method matches your situation β€” and there are five distinct approaches, each suited to a different problem.

This article covers all five, with tool recommendations and CLI commands where relevant.


Why Image File Size Matters

File size affects almost every channel where images travel.

Web performance. Google's Core Web Vitals measure Largest Contentful Paint (LCP) β€” often an image. A 2 MB hero image can push LCP past 4 seconds on mobile, which Google treats as a failing grade. Cutting it to 200 KB can move LCP under 2.5 seconds and directly improve search rankings.

Email delivery. Most email providers cap attachments at 25 MB, but practical deliverability drops sharply above 2-5 MB. Gmail clips messages over 102 KB. Many corporate firewalls reject messages with large inline images entirely.

Upload restrictions. Social platforms, CMSes, and form handlers all impose their own limits. Exceed them and your upload silently fails or gets auto-compressed into something you didn't approve.

Storage costs. An AWS S3 standard tier charges $0.023 per GB-month. 10,000 unoptimized product images at 3 MB each is 30 GB β€” $0.69/month that compounds forever. Trim those to 200 KB each and the same storage costs $0.046/month.

Common Size Limits by Platform

Platform / Context Recommended Size Hard Limit
WordPress uploads (recommended) < 200 KB None (server-set)
Gmail inline images < 102 KB β€”
Email attachments < 2 MB (practical) 25 MB
Instagram (JPG) < 8 MB 8 MB
LinkedIn posts < 5 MB 8 MB
Shopify product images < 20 MB 20 MB
Twitter / X images < 5 MB 5 MB
Google PageSpeed "good" LCP Image < 200 KB (typical) β€”

These aren't arbitrary limits. They reflect where user experience, deliverability, and page performance break down in practice.


Method 1: Compress Without Resizing (Fastest)

Compression reduces file size by encoding pixel data more efficiently β€” without changing the image's pixel dimensions. A 1200Γ—800 photo stays 1200Γ—800; it just takes fewer bytes to store.

Two flavors:

For most web images, lossy compression at quality 75-85 is the right call. The savings are dramatic; the visible quality loss is essentially zero at normal viewing sizes.

With Pixotter

Drop your image into Pixotter's compress tool, choose your quality level, and download. The tool handles JPEG, PNG, WebP, and AVIF. No account required.

With ImageMagick 7.1.1

magick input.jpg -quality 80 output.jpg

For PNG lossless compression:

magick input.png -strip output.png

The -strip flag removes EXIF metadata, ICC profiles, and embedded thumbnails β€” often 20-50 KB on its own.

For batch processing a directory:

for f in *.jpg; do magick "$f" -quality 80 "compressed_$f"; done

Method 2: Resize to Smaller Dimensions

If your image is physically larger than it will ever be displayed, you're storing and transferring pixels nobody sees. This is the most common problem with images uploaded directly from a camera or phone.

The rule: never display a 4000Γ—3000 image in an 800Γ—600 container. The browser downloads all 4000Γ—3000 pixels, then scales down β€” wasting bandwidth and memory.

A standard 4000Γ—3000 JPEG at quality 90 is typically 3-6 MB. Resize it to 800Γ—600 and the same quality setting produces a 150-400 KB file. That's an 85-95% size reduction with zero quality loss at the display size.

When to Resize

With Pixotter

Drop your image into Pixotter's resize tool. Set target dimensions or choose a preset for common platforms (1920Γ—1080 for desktops, 1200Γ—630 for Open Graph images, etc.).

With ImageMagick 7.1.1

Resize to a specific width, maintaining aspect ratio:

magick input.jpg -resize 800x output.jpg

Resize to exact dimensions (may distort β€” use only when aspect ratio is irrelevant):

magick input.jpg -resize 800x600! output.jpg

Resize only if larger than the target (won't upscale small images):

magick input.jpg -resize 800x600\> output.jpg

Method 3: Convert to a Smaller Format

The image format itself is a significant factor. PNG stores data losslessly β€” great for transparency, inefficient for photographs. JPEG compresses photographs well but doesn't support transparency. WebP and AVIF are modern formats that achieve smaller files than either at equivalent visual quality.

Switching formats can reduce file size by 25-50% with no change in pixel dimensions or visual quality.

Format Size Comparison

Source Format Target Format Typical Size Reduction Notes
PNG (photo) WebP (lossy) 60-80% Large gains; WebP handles photos well
PNG (graphic/logo) WebP (lossless) 25-35% Preserves transparency
JPEG WebP (lossy) 25-34% Consistent across most images
JPEG AVIF 30-50% AVIF leads on efficiency; encoding is slow
PNG JPEG 50-70% Loses transparency support
WebP AVIF 10-20% Marginal unless file size is critical

When to use which format:

For a detailed breakdown, see our PNG vs WebP comparison.

With Pixotter

Drop your image into Pixotter's convert tool. Select the target format and download.

With cwebp 1.4.0 (WebP encoder)

cwebp -q 80 input.jpg -o output.webp

For lossless PNG conversion:

cwebp -lossless input.png -o output.webp

Batch convert all JPEGs in a directory:

for f in *.jpg; do cwebp -q 80 "$f" -o "${f%.jpg}.webp"; done

Method 4: Crop Unnecessary Areas

Cropping removes pixels β€” literally cutting off parts of the image that aren't needed. This reduces both dimensions and file size.

Common cases where cropping pays off:

Cropping compounds with compression. Cut 30% of the pixels, then compress the remainder β€” you're often looking at a 40-50% total file size reduction from two simple operations.

With Pixotter

Drop your image into Pixotter's crop tool. Drag to select the region to keep, or use aspect ratio presets.

With GIMP 2.10.38

Open the image, select the Rectangle Select tool (shortcut: R), draw the region to keep, then use Image > Crop to Selection. Export with File > Export As.

With ImageMagick 7.1.1

Crop a specific region (widthΓ—height, offset from top-left):

magick input.jpg -crop 800x600+100+50 output.jpg

Auto-trim whitespace borders:

magick input.jpg -trim output.jpg

The -trim flag removes continuous border areas that match the corner pixel color β€” useful for product photos with white backgrounds.


Method 5: Combine Operations (The Pipeline Approach)

The most effective size reduction usually combines multiple methods: resize to the display dimensions, convert to WebP, then compress to the target quality level. Doing them separately means three round-trips and three chances for intermediate files to accumulate.

The pipeline approach does everything in one step.

This is Pixotter's core differentiator. Most image tools force you to compress on one site, resize on another, convert on a third. Pixotter lets you stack operations: drop the image, configure resize + convert + compress in sequence, and get the final file in one download.

Example pipeline result:

Starting image: iPhone photo, JPEG, 4032Γ—3024 px, 4.2 MB

Step Operation Result
1 Resize to 1200Γ—900 4032Γ—3024 β†’ 1200Γ—900, ~1.1 MB
2 Convert to WebP ~1.1 MB β†’ ~280 KB
3 Compress (quality 82) ~280 KB β†’ ~170 KB
Total All three combined 4.2 MB β†’ 170 KB (96% reduction)

Individual steps stack β€” each one reduces what the next step has to work with.

With ImageMagick 7.1.1 (all in one command)

magick input.jpg -resize 1200x900 -quality 82 output.webp

ImageMagick infers the output format from the file extension. This single command handles the resize and format conversion simultaneously, with quality applied to the WebP encoder.


How Much Can You Reduce?

Results depend on starting format, content type, and target quality. These are representative ranges based on common inputs:

Starting Image Method Typical Reduction Notes
iPhone JPEG (4 MB) Compress only (quality 80) 50-65% ~1.4-2 MB result
iPhone JPEG (4 MB) Resize to 1200px wide 75-85% ~600 KB-1 MB result
iPhone JPEG (4 MB) Convert to WebP 60-70% ~1.2-1.6 MB result
iPhone JPEG (4 MB) Pipeline (resize + WebP + compress) 92-97% ~120-320 KB result
Screenshot PNG (800 KB) Lossless compress (strip metadata) 10-25% ~600-720 KB result
Screenshot PNG (800 KB) Convert to WebP (lossless) 30-50% ~400-560 KB result
Logo PNG (200 KB) Convert to WebP (lossless) 25-35% ~130-150 KB result
Product photo JPEG (1 MB) Compress + convert to WebP 70-80% ~200-300 KB result

Photographs compress more than graphics. Large images benefit more from resizing than small ones. Starting format matters β€” a PNG photograph has more room to gain from format conversion than a JPEG that's already been compressed once.


Quick Reference: Which Method to Use

Situation Best Method
Image came from a camera or phone Resize first, then compress
Need to hit a specific file size limit Compress β†’ if not enough, resize
PNG photograph (no transparency needed) Convert to WebP or JPEG
PNG logo / graphic with transparency Compress (lossless) or convert to WebP lossless
Screenshot Compress lossless, or convert to WebP
Social media upload Resize to platform dimensions, then compress
WordPress upload Resize to max display width, convert to WebP, compress
Email attachment Compress aggressively (quality 65-75); resize if still too large
Need maximum reduction Pipeline: resize + convert to WebP + compress
Image has irrelevant borders or background Crop first, then compress
Already a WebP, still too large Compress (lower quality target) or resize

If you need to hit a specific file size target (like under 100 KB for an email attachment), see our guide on how to compress an image to 100 KB for a step-by-step walkthrough.


FAQ

Does reducing image size reduce quality?

Lossy compression does reduce some image data, but at quality settings of 75-85, the difference is invisible at normal viewing sizes. Lossless methods (metadata stripping, resizing to actual display dimensions, format conversion to WebP lossless) reduce file size with zero quality loss. The goal is matching quality to the use case β€” a 4 MP photo on a 400Γ—300 thumbnail container doesn't need to be 4 MP.

What's the best image format for the smallest file size?

AVIF produces the smallest files β€” typically 20-30% smaller than WebP at equivalent quality. The tradeoff is slow encoding (2-10 seconds per image) and limited tooling. WebP is the practical default for web use: excellent compression, wide browser support (Chrome 17+, Firefox 65+, Safari 14+), and fast encoding. JPEG remains the standard for email and compatibility fallbacks.

How do I reduce image size without losing quality at all?

Three lossless approaches work: strip metadata (removes EXIF data, ICC profiles, embedded thumbnails β€” often 20-50 KB), apply lossless compression (re-encodes PNG or WebP with better algorithm settings), or convert to WebP lossless (typically 25-35% smaller than PNG with identical pixel data). Resizing to actual display dimensions is also lossless in the sense that no visual information is lost β€” you're removing pixels that were never shown anyway.

Can I reduce image size on my phone?

Yes. On iOS, the Shortcuts app lets you build workflows that compress and resize images from Photos. On Android, apps like Photo Compress and Resize handle basic compression. For bulk or pipeline operations β€” resize, convert, and compress in one step β€” a browser-based tool like Pixotter works directly on your device without installing anything.