How to Compress Images Without Losing Too Much Quality
Reduce image file sizes while keeping the details that matter. The best settings depend on whether you are optimizing a photograph, screenshot, transparent logo, or a small thumbnail.
Resize the image to the dimensions it will actually be displayed at, choose an appropriate format, adjust quality gradually, and compare the exported file with the original at its real display size. No quality percentage is best for every image.
Lossy vs. lossless compression
Compression reduces the amount of data required to store an image. Lossless methods preserve the image data exactly, while lossy methods discard some information to achieve smaller files. The right choice depends on how the image will be used and whether fine detail or transparency must be preserved.
| Image type | Good starting choice | Inspect before publishing |
|---|---|---|
| Photographs | JPEG or lossy WebP | Skin tones, gradients, texture, and block artifacts |
| Interface screenshots or diagrams | PNG or carefully tuned WebP | Small text, thin lines, labels, and sharp edges |
| Transparent logo | SVG when appropriate, otherwise PNG or lossless WebP | Transparent edges, colours, and scaling |
| Small preview image | WebP or JPEG | Whether important details remain readable at thumbnail size |
Repeatedly saving a lossy image can compound compression artifacts. Keep the original editable file and export from it when possible, rather than repeatedly recompressing an already compressed JPEG.
Choose a format and starting settings
For photographs, a medium-to-high quality setting is a useful starting point, not a promise about the result. Move quality up or down while checking detail. For graphics with text, a slightly larger lossless file is often more useful than a tiny file with visibly damaged edges.
| Use case | Try first | Why |
|---|---|---|
| Large website photograph | WebP or JPEG at medium-high quality | Usually balances visual detail and file size |
| Product or portfolio image | WebP/JPEG at a higher quality | Fine details may be important to the viewer |
| Screenshot with small text | PNG or high-quality WebP | Text and edges are sensitive to artifacts |
| Transparent icon or logo | SVG or PNG; test WebP if suitable | Preserve transparency and crisp outlines |
Before changing quality, check image dimensions. A 4,000-pixel-wide photo used in a 700-pixel content column may carry more pixels than the page needs. Resizing to a sensible display dimension can reduce the file substantially without adding compression artifacts.
A step-by-step optimization workflow
- Keep a source copy. Save the original file somewhere safe so you can export again later.
- Resize first. Use the Image Resizer when the original dimensions are far larger than the rendered image. Do not upscale a small image just to reach a large target.
- Choose a format. Use the format comparison guide to decide between JPEG, PNG, WebP, AVIF, or SVG.
- Adjust compression. Open the Image Compressor and lower quality gradually for photos. For text-heavy assets, begin with a lossless option or a higher quality setting.
- Compare at actual size. Inspect both images at the size visitors will see, as well as at 100% zoom for fine defects.
- Check output details. Confirm dimensions, file type, transparency, orientation, and whether the file opens in your target software.
- Use the optimized copy. Update the website or document with the exported file, then check the published page on a phone and desktop.
Our Image to WebP Converter can help with format conversion, but converting formats does not automatically mean the file becomes smaller. Test the actual output and choose the version that best meets the quality and compatibility requirements.
Measure the file-size reduction
Compare file sizes in the same unit. For example, a 1.2 MB image reduced to 360 KB saves roughly 70% when using decimal units (1,200 KB to 360 KB). The calculation is:
((Original size − New size) ÷ Original size) × 100A smaller file is only a successful optimization if it still communicates the same information. Do not judge solely by the compression percentage: compare text, edge sharpness, colour gradients, transparency, and any subject details that matter for the page.
Publishing checklist
- Use realistic image dimensions for the layout.
- Keep a source copy of the original.
- Use descriptive filenames and meaningful alternative text for informative images.
- Set image width and height in markup where possible to reserve layout space and help prevent layout shifts.
- Use decorative images with empty alt text when appropriate, rather than repeating nearby text.
- Check the final image at mobile sizes and on the browsers your audience uses.
- Do not publish a quality setting as a universal rule; document the setting that worked for the specific asset.
Frequently asked questions
What is the best quality setting for web images?
There is no universal best setting. Start in the medium-to-high range for photographs and adjust while checking the exported file. Text-heavy graphics and transparent logos often need a different format or a lossless option.
Does converting a JPEG to WebP always make it smaller?
No. The result depends on the source file, dimensions, compression settings, and encoder. Compare the actual file size and visible quality after conversion.
How does browser-based image compression work?
A client-side tool can read the selected file in the browser, process pixels locally, and export a new image. Check the tool’s stated behavior and avoid using shared devices for confidential files.
Should I compress an image before resizing it?
Usually resize first when the source dimensions exceed the intended display size. Then choose the format and quality. Keep the original in case you need another export.
References and related tools
Use these resources to continue checking the details or to complete the task described in this guide.
This guide is intended for practical learning and should be checked against the requirements of your own workflow. To suggest a correction, visit our Contact page or review our Editorial Policy.