# What is photo compression? File size, pixels and quality explained

Canonical: https://handheldheroes.net/what-is-photo-compression/

Published: 2026-11-30
Updated: 2026-11-30

Quick answer

Photo compression makes an image file smaller by storing its data more efficiently. Lossless compression keeps every detail. Lossy compression removes detail that is hard to see, which saves much more space. Compression changes the file size in megabytes. It does not change the number of pixels unless you also resize the photo.

 

## File size, pixels and quality are three different things

 

These terms get mixed up, and the mix-up is why uploads fail.

 

- **Pixels** are the dimensions of the image, such as 4032 by 3024. Multiply them and you get megapixels. A 4032 by 3024 photo is about 12 megapixels.
 
- **File size** is how much storage the file uses, in kilobytes or megabytes.
 
- **Quality** is how closely the saved image matches what the camera captured.

 

Megapixels and megabytes are not the same. A 12 megapixel photo might be 2 MB or 6 MB, depending on the format, the compression level and how much detail the scene contains. A photo of a clear sky compresses far more than a photo of leaves.

 

The scale of the saving is large. Stored with no compression, 12 million pixels at 3 bytes each come to about 36 MB. A camera file of 3 MB for the same image is roughly a twelfth of that.

 

## What is the difference between lossy and lossless compression?

 

Lossless compression packs the data without throwing anything away. PNG works this way. Files stay exact but large.

 

Lossy compression discards fine detail and subtle colour changes that people rarely notice. JPEG and HEIC work this way. A quality setting controls how much is discarded. High quality keeps more detail in a larger file. Low quality gives a small file with visible blocks and smeared edges.

 

## Should you resize or compress?

 

Resizing reduces the number of pixels. Compressing reduces how much data is used to describe each pixel. Both make the file smaller, and they solve different problems.

  

| If the limit says | You need to |
| --- | --- |
| Maximum 2 MB | Compress, and resize if compression alone is not enough |
| Maximum 2000 pixels wide | Resize |
| JPEG only | Convert the format |
| Passport or ID photo size | Resize to the exact dimensions, then check the file size |

  

For a photo that will only be seen on a phone or in an email, halving the width and height is often invisible and cuts the pixel count to a quarter. [How to resize a photo on iPhone](https://handheldheroes.net/resize-photo-iphone/) has the steps.

 

## What happens if you compress a photo twice?

 

Each lossy save discards a little more. Compressing an already compressed photo again adds new artefacts on top of the old ones. Keep the original and make each smaller copy from it, not from a previous copy.

 

## Which formats compress best?

 

HEIC is more efficient than JPEG, so the same picture takes less space. JPEG is accepted almost everywhere. [HEIC vs JPEG on iPhone](https://handheldheroes.net/heic-vs-jpeg-iphone/) compares the two, and the [photo file glossary](https://handheldheroes.net/photo-file-glossary/) defines the rest.

 

## How to compress a photo on your phone

 

On iPhone you can make a smaller copy with built-in tools or with an app. [How to reduce photo file size on iPhone](https://handheldheroes.net/reduce-photo-file-size-iphone/) gives the steps, and [photo compression apps for iPhone](https://handheldheroes.net/photo-compression-apps-iphone/) compares apps by task.

 

## Questions about photo compression

 

**Does compression remove a photo's metadata?**

No. Compression affects the image data. Date, device and location details stay unless the tool you use removes them. See [what EXIF data is](https://handheldheroes.net/what-is-exif-data/).

 

**What quality setting should I use?**

There is no single answer. Start high, check the size, and step down until the file fits the limit. Stop when you can see a difference at normal viewing size.

 

**Why did my file get bigger after converting it?**

Converting from an efficient format such as HEIC to JPEG, or to a lossless format such as PNG, usually increases the size. Resize the photo or lower the JPEG quality to bring it down.

 

## Keep exploring

- [Cross-platform guides](https://handheldheroes.net/platform/cross-platform/)

- [Photos & Video guides](https://handheldheroes.net/topics/photos-video/)

- [What & Why guides](https://handheldheroes.net/guides/explainers/)

- [How to make iPhone photos small enough for email](https://handheldheroes.net/compress-iphone-photos-email/)

- [Photo compression apps on the App Store: 478 apps by the numbers](https://handheldheroes.net/photo-compression-apps-app-store-data/)

- [Photo file terms explained: a glossary](https://handheldheroes.net/photo-file-glossary/)

- [How to compare and choose an app](https://handheldheroes.net/how-we-choose-apps/)
