Back to blog

What Actually Happens to Your Photo When You 'Compress' It

Instant Access Tools Editorial TeamGuides and tutorials to help you get the most out of free online tools for productivity, document management and image editing.

The Illusion of Redundancy

Digital images are heavy. A raw 12-megapixel photo from a modern smartphone carries roughly 36 megabytes of data if left uncompressed. To make that image shareable via email or fast-loading on a website, we rely on image compression algorithms to shave off 90 percent or more of that weight. Most people assume the software just finds a more efficient way to store the same picture, but that is rarely the case.

When you use a lossy format like JPEG, the software performs a surgical extraction of information. It evaluates the image not as a single canvas, but as a series of mathematical problems. By identifying which parts of the visual data are least likely to be perceived by the human optical system, the algorithm discards those specific bits permanently. This process, often called lossy compression, is less about making a file smaller and more about managing a controlled degradation of quality to reach a target file size.

The 8x8 Block Transformation

To understand how your photo changes during compression, we have to look at the Discrete Cosine Transform (DCT). When you hit save at a lower quality setting, the encoder divides your entire image into a grid of 8x8 pixel blocks. It does not treat the image as a continuous stream; it treats it as a series of 64-pixel tiles.

Within each of these 8x8 blocks, the DCT converts spatial information—the actual colors and brightness of each pixel—into frequency information. High frequencies represent sharp changes in color or brightness, such as the edge of a building or the strand of a person's hair. Low frequencies represent gradual shifts, like the smooth blue of a clear sky or the soft transition of a shadow on a wall.

Humans are remarkably good at spotting errors in low-frequency areas (smooth gradients) but quite poor at noticing missing detail in high-frequency areas (chaos and texture). Compression takes advantage of this physiological limitation. It keeps the low-frequency data relatively intact while aggressively thinning out the high-frequency data. This is why a compressed photo of a forest might still look decent, while a compressed photo of a white wall often shows distracting bands of color.

The Role of Quantization

If the DCT is the mathematician, quantization is the executioner. This is the stage where the actual file size reduction happens. After the 8x8 blocks are converted into frequencies, the software uses a quantization table to divide these values by specific constants and round them to the nearest integer.

At high compression levels, many of the high-frequency values are divided down to zero. Once a value becomes zero, it effectively ceases to exist in the file. When you reopen the image, the computer tries to reverse the math, but it cannot recover what was rounded away. It has to guess. This "guessing" is what creates artifacts. You have likely seen them: the blocky squares in the sky or the weird shimmering halos around text. These are the physical manifestations of the 8x8 grid failing to accurately reconstruct the original high-frequency details.

Why Faces and Text React Differently

Compression is not an equal-opportunity destroyer. Because of how quantization targets specific frequencies, different subjects suffer in different ways.

Human skin is highly sensitive to compression. Skin consists of very subtle, low-frequency gradients. When a compression algorithm gets too aggressive, it rounds off those subtle color shifts into flat, waxy patches. Because our brains are evolutionarily hard-wired to recognize faces, even a tiny amount of quantization error on a person's cheek looks uncanny or "digital" to us.

Conversely, text and sharp geometric logos represent extreme high-frequency data. There is a hard jump from the black of a letter to the white of a background. When the DCT-based compression hits these edges, it struggles to maintain the sharp transition. This results in "ringing" artifacts—smudges and dots that appear to vibrate around the edges of the letters. It is a common mistake to use JPEG for logos when a format like PNG would be much more appropriate. You can read more about why choosing the wrong format for graphics is a problem in our guide on png-vs-jpg-logo-transparency-mistake.

The Chrominance Subsampling Factor

Another trick used to shrink your photo is called chrominance subsampling. Our eyes have more receptors for brightness (rods) than for color (cones). Engineers realized decades ago that if they kept the brightness information at full resolution but halved the resolution of the color data, we probably wouldn't notice.

In many common compression schemes, the color information is literally stored at a lower resolution than the brightness information. This is why, in a highly compressed image, you might see the color of a red shirt "bleeding" slightly past the actual edges of the shirt into the surrounding background. The color is being painted on with a much wider brush than the brightness.

Strategies for Better Results

Understanding these mechanisms allows you to make better choices when using an image converter. If you are preparing a photo for a background where it will be blurred or overlaid with text, you can be aggressive. You can drop the quality setting significantly because the high-frequency details would have been obscured anyway.

However, if you are compressing a portrait or an image with fine text, you must remain conservative. Aim for quality settings between 75 and 85. Going above 90 often results in a file size that is unnecessarily large with no perceptible gain in quality, as the quantization table is barely doing any work. Dropping below 60 is where the 8x8 block boundaries start to become visible to the naked eye.

Beyond JPEG: The Modern Landscape

While JPEG is the most famous example of these mechanics, newer formats like WebP and HEIC use more sophisticated versions of these same principles. WebP, for example, uses "predictive coding." Instead of just looking at one 8x8 block, it looks at the blocks next to it and tries to predict what the current block should look like based on its neighbors. It then only stores the difference between its prediction and the reality. This results in much smaller files for the same perceived quality.

Managing your image assets requires a balance between speed and fidelity. Every time you re-save a lossy image, the 8x8 grid is recalculated, and more data is rounded off to zero. This is known as digital generation loss. To prevent your photos from turning into a muddy, blocky mess, always perform your conversions and compressions from the highest-quality original file available rather than re-compressing a file that has already been through a tool once.

Our browser-based engine handles these mathematical transformations locally on your machine, ensuring that the DCT and quantization processes are applied cleanly without unnecessary intermediate steps that degrade your pixels further.

Try it: https://kind-cloud-generator.lovable.app/tools/image-converter

Try our related free tools

Put this guide into practice with our free image compressor, PDF merger, and AI grammar checker — all run in your browser with no signup.

Related articles

About the author

Instant Access Tools Team

Reviewed by the Instant Access Tools Editorial Team

Our editorial team builds and reviews free browser-based tools for PDFs, images, calculators and AI utilities. Every guide is written by writers who use the tools themselves and reviewed for accuracy before publication.