Updated March 8, 2026

By Jack Smith, iOS Developer at DB Labs

Photo Formats

Photo Compression on iPhone: How It Works

Every photo your iPhone takes is compressed before it is saved. Compression is why a 48 megapixel photo takes up 15 MB rather than 250 MB. Here is how compression works, what it does to quality, and what you can control.

How iPhone Photo Compression Works

iPhone uses lossy compression (HEIC format by default) that intelligently removes imperceptible image data to shrink file sizes by 70-80% compared to uncompressed. The removed data is chosen using a psychovisual model — the codec discards details the human eye cannot distinguish. At HEIC's default quality level, the compression is effectively invisible. You only notice quality loss if you compress further or switch to aggressive JPEG settings. ProRAW bypasses camera compression for professional editing, at the cost of 10-20x larger files.

Lossy vs Lossless Compression

All image compression falls into two categories:

Lossy Compression

Lossy compression permanently removes some image data to achieve a smaller file. The removed data cannot be recovered — it is gone. HEIC and JPEG both use lossy compression. The key to good lossy compression is a psychovisual model: a mathematical description of what the human visual system can and cannot perceive. The codec only removes data that the human eye cannot detect at normal viewing distances and sizes.

At high quality settings (which iPhone uses by default), HEIC compression is perceptually lossless — meaning you cannot see any difference between the compressed file and the original raw sensor data, even when scrutinizing at 100% zoom on a high-resolution display. The quality degradation becomes visible only when compression is set very aggressively, as happens when social media platforms re-compress your uploaded photos.

Lossless Compression

Lossless compression reduces file size without discarding any data. The original image can be perfectly reconstructed from the compressed file. PNG uses lossless compression. Apple ProRAW uses near-lossless compression for the raw sensor data.

The trade-off is file size: lossless compression typically achieves only 30-50% size reduction for photographic images, while good lossy compression achieves 70-90% reduction. For a photograph viewed on screen, there is no practical visual benefit to lossless over high-quality lossy.

Format Compression Type Uncompressed equivalent (24MP) Actual file size Compression ratio
Uncompressed RAW None ~140 MB 140 MB 1:1
ProRAW Near-lossless ~140 MB 25–35 MB ~5:1
PNG Lossless ~140 MB 50–100 MB ~2:1
JPEG (high quality) Lossy ~140 MB 6–10 MB ~15:1
HEIC (default) Lossy (efficient) ~140 MB 5–8 MB ~20:1

How HEIC Compression Works

HEIC uses the same compression algorithm as the H.265 (HEVC) video codec — just applied to still images instead of video frames. The algorithm works in several stages:

  1. Color space conversion: The image is converted from RGB to a luminance + chrominance color space (YCbCr). Human eyes are more sensitive to brightness variation than color variation, so color channels can be stored at lower resolution without visible quality loss.
  2. Block division: The image is divided into blocks (typically 4×4 to 64×64 pixels). Larger blocks work better for smooth areas; smaller blocks for fine detail.
  3. Transform coding: Each block is converted from pixel values to frequency coefficients using a discrete cosine transform (DCT). This converts spatial information into frequency information that can be compressed more efficiently.
  4. Quantization: High-frequency coefficients (fine detail) are rounded or discarded based on a quality factor. This is where lossy compression happens — fine texture data is reduced or eliminated.
  5. Entropy coding: The remaining data is further compressed using lossless entropy coding (similar to how ZIP files work).

HEIC's advantage over JPEG is that it uses larger, more flexible block sizes and more sophisticated prediction between blocks (borrowed from video compression inter-frame prediction). This results in better compression — smaller files at the same quality, or better quality at the same file size.

JPEG vs HEIC: Quality at the Same File Size

At identical file sizes, HEIC consistently produces higher quality images than JPEG. Independent testing by image quality researchers shows HEIC outperforms JPEG by approximately 40-50% in SSIM (Structural Similarity Index) scores at the same bitrate.

In practice, this means:

  • A 4 MB HEIC file looks as good as a 7-8 MB JPEG file
  • HEIC maintains sharper fine detail in high-frequency areas (grass, hair, fabric)
  • HEIC produces fewer blockiness artifacts in smooth gradients and skies
  • HEIC preserves more accurate color in shadow and highlight areas

Does iPhone Compress Photos When Sharing?

Sharing method determines whether additional compression is applied:

  • AirDrop: No compression. Full quality original file is transferred.
  • iMessage (to iPhone): Full quality if both devices support HEIC; slight compression in some conditions.
  • SMS/MMS: Heavy compression — MMS has a maximum attachment size (typically 1-3 MB). Your iPhone compresses photos significantly before sending via SMS.
  • Email (iPhone Mail): You choose Small, Medium, Large, or Actual Size when sending. Actual Size sends without compression.
  • Instagram / TikTok / Facebook: Platform re-compresses to JPEG after upload, typically at 80-85% quality. Expect visible quality reduction.
  • Google Photos (Original Quality): No compression on upload. Storage Saver setting applies compression.
Best practice: For professional or archival sharing, always use AirDrop, USB transfer, or Google Photos / iCloud with original quality settings. Never rely on SMS or social media uploads for quality-critical photo delivery.

iCloud and Optimize Storage

When you enable Optimize iPhone Storage in iCloud Photos, your iPhone stores compressed thumbnails locally and keeps the originals in iCloud. This is a storage optimization feature, not a quality reduction:

  • The originals stored in iCloud are never recompressed — they remain at the original HEIC or JPEG quality you shot them at.
  • The local thumbnails are lower resolution (enough for scrolling and previewing) but not enough for full-resolution editing.
  • When you tap a photo to view it full-size or edit it, your iPhone downloads the full-resolution original from iCloud automatically.

For more on this setting, see our guide on Optimize iPhone Storage explained and our iCloud Photos glossary entry.

Compression reduces file sizes, but the most effective way to free up storage is deleting photos you no longer want. Use Swype Photo Cleaner to quickly review your library and remove the shots that didn't make the cut.

Free Up iPhone Storage Today

Even with great compression, thousands of unwanted photos add up. Swype Photo Cleaner lets you rapidly swipe through your camera roll — left to delete, right to keep — reclaiming gigabytes in minutes.

Free · iPhone · iOS 16+ · 100% on-device, zero uploads

Download on theApp Store

Free · iPhone · iOS 16+

Frequently Asked Questions

Does iPhone compress photos when saving?

Yes. Every photo saved by the iPhone camera is compressed using HEIC (lossy) or JPEG (lossy) compression by default. At the default quality settings, this compression is perceptually lossless — you cannot see any difference. ProRAW bypasses camera compression for professional editing workflows.

Does iPhone reduce photo quality when sending?

It depends on the method. AirDrop sends full quality. iMessage is usually full quality between Apple devices. SMS/MMS compresses heavily to meet carrier size limits. Email lets you choose quality. Social media platforms (Instagram, TikTok) re-compress photos after upload. For quality-critical sharing, always use AirDrop or cloud storage with original quality settings.

What is the difference between lossy and lossless photo compression?

Lossy compression permanently removes some image data to achieve smaller files. HEIC and JPEG both use lossy compression. Lossless compression reduces file size without removing any data — PNG and ProRAW use lossless or near-lossless compression. For photos viewed on screen or shared online, high-quality lossy compression is indistinguishable from lossless. Lossless only matters for professional editing or large-format printing.

Does Optimize iPhone Storage compress photos?

Optimize iPhone Storage stores compressed thumbnails on your device and full-resolution originals in iCloud. The originals in iCloud are never recompressed — they remain at original quality. The local thumbnails are lower resolution for storage efficiency. When you view or edit a photo full-size, the full-resolution original downloads automatically from iCloud.