🏠 Home 🛠️ All Tools 📝 Blog 🗜️ Compress Images

Image Compression · 5 min read

Compress Images Without Losing Quality: The Complete Guide

Shrink JPG, PNG, and WebP files dramatically without visible degradation — the right settings for every use case.

Image Compression 📅 May 30, 2026 ⏱️ 5 min read By PDFdukan Team

A photo taken on a modern smartphone is typically 4–8 MB. Attached to an email with four other photos, you hit the 25 MB attachment limit. Embedded in a PDF report with ten images, the file becomes unwieldy to share. Uploaded to a website without compression, it slows page load times and costs visitors mobile data. Image compression solves all of these problems — and the right technique reduces file size by 70–90% with changes that are genuinely invisible to the human eye. This guide explains exactly how compression works and the settings to use for every scenario.

1. Why Image Files Are So Large to Begin With

An uncompressed image stores color data for every single pixel. A 12-megapixel photo has 12 million pixels, each requiring 3 bytes for RGB color — that is 36 MB of raw data before any file format overhead. Image formats like JPG and PNG were designed specifically to reduce this through compression, but the camera-default settings prioritize quality over size, producing files far larger than most sharing or display use cases require.

The key insight: the human visual system is far more sensitive to luminance (brightness and contrast) than to chrominance (color detail). JPG compression exploits this by discarding high-frequency color information that your eyes barely perceive while preserving the brightness detail that makes images look sharp. Done well, the result is visually identical to the original at a fraction of the size.

2. Lossy vs. Lossless Compression

Every compression method falls into one of two categories, and choosing the wrong one for your use case either wastes space or degrades quality unnecessarily.

Lossy Compression

Lossy compression permanently discards image data to achieve smaller file sizes. JPG is the classic example. When you save a JPG at "80% quality," the encoder discards the least-perceptible 20% of image information — primarily fine color transitions and high-frequency texture in smooth areas. The result looks almost identical on screen but cannot be restored to the original. Each time you re-save a lossy file, it loses another generation of quality — the so-called "generation loss" problem. Always work from your original and export a compressed copy; never re-compress an already-compressed JPG.

Lossless Compression

Lossless compression reduces file size without discarding any data. The original can be perfectly reconstructed. PNG uses DEFLATE compression (the same algorithm as ZIP), which finds and eliminates repetitive patterns in pixel data without any quality loss. TIFF and WebP both support lossless modes. Lossless files are always larger than their lossy equivalents — sometimes significantly so. Use lossless formats when pixel-perfect accuracy matters: icons, logos, screenshots with text, diagrams, and document scans intended for OCR.

💡 The Golden Rule: Use lossy (JPG/WebP) for photographs. Use lossless (PNG) for screenshots, diagrams, logos, and text-heavy images. Applying JPG compression to a screenshot with text produces blocky artifacts around characters — ugly and harder to read.

3. Format Comparison: JPG vs. PNG vs. WebP

JPG
Lossy · Universal Support
Best for photographs and scanned documents. Quality setting 80–85% is the sweet spot — visually indistinguishable from the original at 60–75% of the file size. Avoid for logos, screenshots, or anything with sharp edges and text.
PNG
Lossless · Universal Support
Best for graphics, screenshots, illustrations, and any image with transparency. Lossless means no quality loss, but files are larger than JPG for photographic content. PNG-8 (256 colors) vs PNG-24 (full color) — choose PNG-8 for simple graphics to save space.
WebP
Both Modes · Modern Browsers
Google's format supports both lossy and lossless modes. WebP lossy is typically 25–35% smaller than equivalent-quality JPG. WebP lossless is 20–30% smaller than PNG. Supported by all modern browsers and most image editors. The best choice for web images in 2026.
AVIF
Lossy/Lossless · Newer
The next-generation format — even smaller than WebP (another 20–30%). Excellent for web use but encoding is slower and editing tool support is still catching up. Use for web delivery; keep JPG/PNG as working originals.

4. DPI and Resolution for Different Use Cases

DPI (dots per inch) is frequently confused with pixel dimensions, but they are related in a specific way. DPI only matters when an image is printed — a 72 DPI image and a 300 DPI image can have identical pixel dimensions and look identical on screen. The DPI metadata tells a printer how large to render the image.

💡 Resolution Downscaling: If you have a 300 DPI image for print and need a web version, resize the pixel dimensions to target screen size (typically 1200–1600px wide maximum) and set DPI to 96. This is not just a metadata change — it actually removes pixels and reduces file size proportionally to the square of the dimension reduction.

5. Real-World Size Comparisons

Here is what compression actually achieves on typical files, based on a standard 12MP smartphone photo (4032×3024 pixels):

File size comparison — 12MP smartphone photo (typical)
Original HEIC (from phone)
~4.5 MB
JPG exported at 100% quality
~8 MB
JPG at 85% quality (recommended)
~1.8 MB
JPG at 70% quality
~750 KB
WebP at equivalent visual quality
~520 KB

The jump from 100% JPG to 85% JPG is an 77% size reduction with no visible difference on any normal display. The 85% JPG vs. 70% JPG difference is visible only on close inspection of smooth gradients — acceptable for email and web use, not ideal for print.

6. Best Settings for Documents vs. Photos

Scanned Documents (Text-Heavy)

For document scans where OCR is not needed and the output will be viewed on screen: convert to grayscale, use JPG at 80% quality, and resize to 150 DPI equivalent. This produces files under 100 KB per page — perfectly readable on screen and email-safe. If OCR will be run on the file, keep the original at 300 DPI in PNG or TIFF format and compress a separate viewing copy. Use the CamMaster compressor to batch process multiple pages.

Product or Portfolio Photos

For photos shared via email or embedded in reports: JPG at 85% quality, maximum width 2000px (enough for full-screen display on any monitor). For website use, convert to WebP at equivalent quality for an additional 25–30% size reduction. Always strip EXIF metadata from photos before web publishing — it can contain GPS location data and camera serial numbers that you may not want public.

Screenshots and UI Images

Screenshots containing text and UI elements must use PNG or WebP lossless — never JPG. The block artifacts JPG produces around text edges and sharp lines are immediately visible and make screenshots look unprofessional. PNG-24 for screenshots with many colors; PNG-8 for screenshots with simple flat-color UI elements (can be 70% smaller).

⚠️ Never Re-Compress a Compressed JPG: Opening a JPG, making no changes, and saving it again as JPG degrades quality even at 100% quality setting. The re-encoding process introduces a new round of compression artifacts on top of the existing ones. Keep your originals as originals and only compress when exporting a final deliverable copy.

7. Batch Compression Workflow

When you have dozens of images to compress — a folder of scanned documents, a product photo shoot, screenshots for a report — a methodical batch workflow saves time and ensures consistency.

  1. Audit your files first. Sort by file size (largest first) to identify the biggest compression wins. Focus effort on files over 2 MB.
  2. Decide on a target size or quality. For email attachments: target under 500 KB per image. For web: target under 200 KB. For document archives: target under 150 KB per page.
  3. Choose format by content type. Photos → JPG 85% or WebP. Screenshots/diagrams → PNG. Mixed → WebP handles both well.
  4. Use CamMaster's batch compressor to process multiple files at once with consistent settings. The output preview shows before/after file size so you can verify results before downloading.
  5. Keep originals. Save compressed versions to a separate folder (/compressed/ or /web/). Never overwrite originals — storage is inexpensive and you will eventually need the full-resolution version for print.
  6. Validate a sample. Open a few compressed files at 100% zoom on a monitor and compare against the originals. If you spot artifacts, increase quality by 5% and reprocess.

🗜️ Compress Images Free — Instant Results

Compress JPG, PNG, and WebP images in your browser. See before/after file size instantly. No upload to any server.

Compress Images Free →
← How OCR Works Going Paperless →