Image compression shrinks a file's size, either by reducing resolution or by using an algorithm that discards data the eye barely notices, so a page carrying that image loads faster without necessarily looking worse to a visitor. Large, uncompressed images are one of the most common reasons a page fails Core Web Vitals, since images are often the heaviest single asset on any given page.
There are two broad approaches: lossy compression, which trades a small, usually invisible amount of quality for a much smaller file, and lossless compression, which shrinks the file without discarding any image data at all. Modern formats like WebP and AVIF generally compress better than older JPEG or PNG files at the same visual quality, which is why converting a site's images is often one of the highest-impact, lowest-effort speed fixes available. Compressing before upload, rather than relying on a plugin to do it after the fact, also keeps the original source files smaller and easier to manage over time.
