Skip to main content

image

How to Compress Images Without Losing Quality: JPG, PNG, WebP & More

robinhood-projects11 min read

Compress JPG

Reduce JPEG file size without significant quality loss

Use Tool β†’

Compress PNG

Reduce PNG file size while keeping it lossless

Use Tool β†’

Resize Image

Resize JPEG, PNG, or WebP images to specific pixel dimensions

Use Tool β†’

How to Compress Images Without Losing Quality

Large image files slow down websites, fill up email inboxes, and eat through cloud storage quotas. The good news: you can reduce image file size by 60–90% with no visible quality loss β€” if you pick the right compression method for the right format.

This guide covers everything: the difference between lossy and lossless compression, format-specific best practices for JPG, PNG, WebP, and AVIF, and practical file size targets for common use cases.

Lossy vs Lossless Compression β€” What's the Difference?

Lossy compression permanently discards some image data to achieve smaller files. The amount discarded is controlled by a quality setting. At high quality (e.g. JPEG 85+), the loss is invisible to the human eye. At low quality (JPEG 40–60), you'll see blurring and blockiness.

Lossless compression reorganises the data more efficiently without throwing any away. Every pixel in the decompressed image is identical to the original. Lossless is smaller than the raw original but larger than the same image compressed lossily.

Rule of thumb:

  • Photos β†’ lossy (JPEG, WebP lossy, AVIF)
  • Graphics, icons, screenshots β†’ lossless (PNG, WebP lossless)

JPG Compression β€” Best for Photos

JPEG is the standard format for photographs. It uses lossy compression that works by discarding fine detail in areas of smooth colour β€” exactly the kind of data the human eye ignores in real photos.

Quality settings:

QualityJPEG valueUse case
Low50–65Thumbnails, previews
Medium70–82Web images, email
High85–95Print-ready, archival

Tips:

  • 75–80 is the sweet spot for most web use. File size shrinks 70–80% vs the uncompressed original with no visible loss.
  • Never re-compress an already-compressed JPEG. Each compression cycle compounds quality loss.
  • MozJPEG (used by FileCrank) produces 5–15% smaller files than standard libjpeg at the same visual quality.

How to compress a JPG without losing quality: Use the FileCrank JPG Compressor. Select "Medium" quality, upload your JPEG, and download the result in seconds.

PNG Compression β€” Lossless by Default

PNG uses lossless compression. This means a compressed PNG is identical to the original β€” no data is discarded, transparency is preserved, and text/line art remains perfectly sharp.

Lossless PNG compression works by choosing better deflate parameters (compression level, filter strategy). A poorly-compressed PNG might be reduced by 30–50% without any quality change.

Lossy PNG compression (palette quantisation) reduces the number of colours to 256 or fewer. This can cut file size by 50–80% and is nearly invisible for icons, logos, and simple illustrations. It's not suitable for photographs.

When to use each:

  • UI screenshots, diagrams, text β†’ lossless PNG
  • Simple icons with few colours β†’ lossy PNG (palette)
  • Photos stored as PNG (common mistake) β†’ convert to JPEG instead

How to compress a PNG: Use the FileCrank PNG Compressor. Choose Lossless mode to preserve every pixel, or Lossy (palette) for maximum size reduction on graphics.

WebP and AVIF β€” Modern Formats with Better Compression

WebP was developed by Google and offers significantly better compression than JPEG at the same visual quality β€” typically 25–35% smaller. It supports both lossy and lossless modes, and crucially, it supports transparency (like PNG) in both modes.

AVIF (AV1 Image File Format) is newer and even more efficient than WebP β€” typically 30–50% smaller than JPEG. Browser support is now excellent (Chrome, Firefox, Safari, Edge).

Should you switch?

  • If you're building a website targeting modern browsers: yes, WebP or AVIF are worth the switch.
  • If you need universal compatibility (email clients, legacy apps): stick with JPEG/PNG.
  • Tools like FileCrank JPG to WebP convert in one click with no quality loss at a lower file size.

When to Resize vs Compress

These are different tools for different goals:

GoalRight tool
Reduce file size, keep dimensionsCompress
Change image dimensionsResize
Reduce dimensions AND file sizeResize first, then compress

A 4000Γ—3000 px photo at 5 MB doesn't need to be served at full resolution on a website that displays it at 800Γ—600 px. Resize it first with the FileCrank Image Resizer, then compress the result.

Practical Size Targets by Use Case

Use caseTarget sizeRecommended quality
Email attachment≀ 1 MBJPEG 75–80
Website hero image≀ 500 KBJPEG 75, WebP 80
Social media post≀ 300 KBJPEG 80
Product thumbnail≀ 100 KBJPEG 70, WebP 75
Print-ready imageβ‰₯ 1 MB (300 DPI)JPEG 90+
App icon/logo≀ 50 KBPNG lossless or SVG

How to Compress Any Image in Seconds

The fastest way to compress any image format β€” JPG, PNG, WebP, AVIF, or GIF β€” is to use a universal compressor that auto-detects the format:

  1. Go to the FileCrank Image Compressor
  2. Drop your image onto the page (or click to browse). Up to 50 MB.
  3. Choose your quality: Low (smallest file), Medium (recommended), or High (near-original quality).
  4. Click the download button. Your compressed image is ready in seconds.
  5. Use the before/after drag slider to see exactly how much the file size changed.

No signup required. Files are automatically deleted within 1 hour.

Should You Compress First or Resize First?

This question comes up constantly, and the answer matters for both file size and quality.

Resize first, compress second. Here's the logic: a compressor's job is to reduce the data in an image. If you hand it a 4000Γ—3000 pixel image, it has twelve million pixels worth of data to work through. If you first resize that image to 800Γ—600 pixels, it now has only 480,000 pixels β€” that's 96% less raw data before compression even begins. The compressor then operates on a fraction of the original input, producing a smaller result with less computational work.

Compressing first and resizing second gives you the worst of both worlds: the compressor works hard on data you're about to throw away, and the resizing step introduces its own interpolation artefacts on top of the compression artefacts already present.

Practical rule: Ask yourself what the largest size this image will ever be displayed at. If the answer is 800 pixels wide, resize to 800 pixels first using the FileCrank Image Resizer, then compress. If the image needs to serve multiple display sizes (responsive images via srcset), resize to each breakpoint variant before compressing each one.

The only exception is print: if you're preparing a file for a print shop at 300 DPI, do not resize down β€” the physical dimensions directly determine print quality. Compress lightly (JPEG 90+) and leave the pixel count alone.

Batch Compression: Working with 50+ Images

Individual compression is simple. Batch compression β€” fifty product photos, a full real estate shoot, an entire season of event photography β€” requires a different approach.

When you have a handful of files (up to ~20): An online tool like FileCrank's Image Compressor handles these well. Upload in sequence, download the results, done. No installation, no configuration.

When you have dozens or hundreds of files: Command-line tools are faster. Two widely used options:

  • ImageMagick (mogrify -quality 80 -strip *.jpg) processes an entire directory of JPEGs in one command. The -strip flag removes EXIF metadata at the same time (see the next section).
  • Squoosh CLI (Google's open-source tool) gives you codec-level control over WebP and AVIF encoding in batch mode.

For teams running e-commerce or content sites, the best long-term setup is an image processing pipeline that compresses automatically on upload β€” either via a CDN with built-in image optimisation or a build-step plugin (for example, next/image in Next.js handles this at the framework level).

For one-off batch jobs without installing anything, upload files individually to FileCrank and work through them in sequence β€” the interface is fast enough that twenty images takes under five minutes.

Image Compression and Core Web Vitals: Why LCP Depends on It

If your site is measured by Google PageSpeed Insights or Lighthouse, image compression is not just about bandwidth β€” it directly affects your Largest Contentful Paint (LCP) score, which is one of Google's three Core Web Vitals.

What LCP measures: The time from when a user starts loading a page to when the largest visible element (usually a hero image or above-the-fold photo) finishes rendering. Google's target is under 2.5 seconds. Sites that fail this threshold see ranking penalties in search.

How image file size affects LCP: On a typical 4G mobile connection (roughly 15 Mbps), a 1 MB hero image takes about 500ms to download β€” and that's before the browser decodes and renders it. A well-compressed 150 KB WebP version of the same image takes under 100ms. That 400ms difference is frequently the gap between a passing and failing LCP score.

Practical steps to bring LCP under 2.5s:

  1. Identify your LCP element using Chrome DevTools or PageSpeed Insights. It's almost always an image.
  2. Resize it to the exact display dimensions (no larger).
  3. Compress it: JPEG 75–80 or WebP 80 are reliable starting points.
  4. Add a loading="eager" and fetchpriority="high" attribute to the LCP image's <img> tag so the browser prioritises it.
  5. Serve it from a CDN so the download starts from a server geographically close to the user.

For a broader look at how format choices compound these gains, see the comparison of PNG vs WebP vs AVIF image formats β€” switching format alone often improves LCP by 20–40% without changing the visual design at all.

EXIF Data and File Size: The Hidden Kilobytes

Every image captured by a digital camera or smartphone carries EXIF metadata embedded in the file: GPS coordinates, camera make and model, aperture, shutter speed, ISO, software version, copyright strings, and thumbnail previews of the image itself.

None of this data affects how the image looks on screen. All of it adds to the file size.

How much does EXIF add? A smartphone photo typically carries 20–80 KB of EXIF data. A file with a full GPS record, editing software history, and an embedded thumbnail can carry more than 100 KB of metadata. Strip it, and you get that storage back for free β€” no quality tradeoff at all.

When stripping matters most: Websites serving many images per page, e-commerce product galleries, and blog post images are the best candidates. If you're serving fifty product images per page and each carries 40 KB of unnecessary EXIF, that's 2 MB of data your users download for no reason.

When to keep EXIF: Archival photography where provenance matters, stock image submissions that require copyright metadata, and any workflow where camera settings need to be reviewed later. In those cases, strip EXIF from the web-serving copy but keep the originals intact.

FileCrank's compression tools strip EXIF by default on web-quality exports. If you want more control over exactly which metadata fields are removed, the dedicated Remove Image Metadata tool lets you inspect and selectively strip EXIF, IPTC, and XMP data before downloading.

For a deeper look at the difference between lossy and lossless approaches β€” and when each applies beyond just images β€” see Lossy vs Lossless File Conversion Explained.

Summary

  • JPG photos: compress with quality 75–82 (Medium) β€” 70–80% smaller, invisible loss.
  • PNG graphics/icons: lossless compression for zero-loss; lossy palette mode for maximum savings.
  • Modern websites: consider converting to WebP or AVIF for 25–50% better compression.
  • Resize before compressing: fewer pixels means less data for the compressor β€” always resize to the display size first.
  • Batch jobs: command-line tools (ImageMagick, Squoosh CLI) for large sets; FileCrank for individual or small batches.
  • LCP and PageSpeed: oversized hero images are the most common cause of a failing LCP score β€” compress and resize them first.
  • Strip EXIF: metadata adds 20–100 KB per image with zero visual benefit; use Remove Image Metadata to clean it up.
  • Universal tool: Compress Image handles all formats automatically.