An image can look great and still be too large to upload, email, or load quickly on a website. Compression reduces the amount of data in the file. Resizing changes the width and height in pixels. If an upload form specifies both dimensions and a maximum file size, check both after exporting.
Start with your original image, choose a format that fits your purpose, and compare the exported copy at the size people will see it. Keep the original separately for printing and future edits.
Start with image compression for beginners if the terms are new to you. For uploads with a size cap, follow the file-size limit guide and use the online image resizer to reduce pixel dimensions.
Lossy compression discards some information to save space. At stronger settings, fine textures may soften or visible blocks may appear. JPEG photos and lossy WebP images use this approach.
Lossless compression stores the same image data more efficiently. Use it to preserve original pixels in screenshots, diagrams, and archival copies. A small website thumbnail can usually tolerate stronger compression than a full-screen portfolio photo or print.
JPEG uses the discrete cosine transform, or DCT, to describe small groups of pixels by how quickly their brightness and color change. The encoder can store some of those changes with less precision. At aggressive settings, fine details vanish and block boundaries may show.
Chroma subsampling records color at a lower spatial resolution than brightness. It works well for many photos, but it can soften small, brightly colored lettering. Fractal compression takes another approach by approximating parts of the picture with patterns found elsewhere in the image.
Run-length encoding stores a repeated value alongside the number of times it occurs. A row of 100 identical pixels can be described by one color and a count. This works best when the data has long runs of the same value.
Predictive coding estimates a value from nearby values and stores the difference. For example, 1,085,459 is 6,921 more than 1,078,538. Given the starting number and the difference, you can recover the second number exactly. In an image, small differences between neighboring pixels can help an encoder reduce the file size.
Compare files by appearance and size. Quality numbers from different encoders do not represent the same output.
Some online compression tools process files in your browser. Others send them to a server. Before working with sensitive photos or client assets, check where processing takes place and what the provider says about file retention.
You can also use an offline image editor for sensitive files. Keep an untouched copy so you can export again without repeatedly compressing an already compressed image.
Add an image to your compressor, then set the output format. Adjust quality, palette size, or decimal precision if the tool provides that control. Compare the preview and estimated file size, apply your settings, and download the result.
The examples below show the controls on ImageCompressor.com. Controls vary by format and application.
Add the JPEG and start with the default quality. Compare the original and preview at the same zoom. Lower quality gradually until the output meets your size target or you see artifacts.
Check the estimated size before applying the setting. Review each photo individually if you are compressing a batch. Look closely at faces, fine textures, and sharp edges.
Tip: Judge the preview at its intended display size. A small thumbnail can often use a smaller file than a full-width photo.
PNG can be compressed losslessly while keeping the pixels intact. Some optimizers save more space by reducing the number of colors in the palette. That conversion can alter pixel colors even though the output PNG uses lossless encoding.
Lower the palette gradually. Check gradients and transparent edges for banding or halos. Graphics with flat colors are good candidates for a small palette.
For a photo, try lossy WebP and compare a few quality settings. For a logo or screenshot that needs the original pixel values, try lossless WebP if the tool offers it.
Compare exports at the same pixel dimensions. Check file size and transparency before replacing the source image on your site.
A GIF frame can use up to 256 colors. Reducing the palette can shrink the file, but it may create visible bands in gradients or cause some details to flicker.
Adjust the palette and play the entire animation before downloading. Check its timing, loop, and transparent edges.
SVG uses coordinates and paths to describe shapes. Logos and icons made with vectors stay sharp across display sizes. An optimizer can remove extra metadata and reduce the number of decimal places in coordinates.
Reduce precision in small steps. Too much rounding can shift thin strokes or distort closely spaced shapes.
Check the optimized file at icon size and at a larger scale. Compare its alignment and details before replacing the original.
Decide what the image needs to preserve, such as exact pixels, transparency, or animation. Adjust the relevant controls and review the result at its intended display size. Check that the downloaded file meets any size and dimension limits.