Image compression is the process of representing an image with less data. It is useful when a file is too large for an upload, attachment or website. But file size is affected by more than one variable: image dimensions, format, encoder settings and the visual complexity of the source all matter.
Lossy and lossless compression
Lossy compression intentionally discards some information to achieve a smaller representation. JPG is a familiar example. At moderate settings, the quality can remain visually good while the file becomes much smaller. Lossless compression preserves the represented image data, which is useful for graphics and other material where exact reproduction matters.
Dimensions can dominate the result
A 5000 × 3500 photo contains far more pixels than a 1200 × 840 version. If the destination displays the image at roughly 1200 pixels wide, storing the extra pixels may have little visual benefit. Resizing before compression can therefore produce a larger practical reduction than changing the quality setting alone.
Quality settings are not universal
A quality number is meaningful only within the encoder and format that uses it. Two tools can show the same percentage or quality value and produce different results. Instead of chasing a particular number, inspect the actual output at its intended display size.
Format choice matters
| Format | Typical strength | Watch for |
|---|---|---|
| JPG | Photos and broad compatibility | Lossy artifacts and no normal transparency workflow |
| PNG | Lossless graphics and transparency | Can be large for photos |
| WebP | Modern web delivery | Some older software may not accept it |
| HEIC | Efficient supported photo storage | Compatibility varies by destination |
Compression does not fix every upload problem
If an upload rejects a file because of its format, making the file smaller will not change the format. If the problem is a pixel-dimension limit, compression may also leave too many pixels. Identify the rule being violated before choosing the tool.
A good stopping point
Stop compressing when the file meets the destination requirement and the image still looks right. There is rarely a reason to chase the absolute smallest possible file when a slightly larger file gives noticeably better quality.