How to Compress Images Without Visible Quality Loss
Resize first, pick the right format, tune quality by eye and strip GPS metadata. A practical guide for websites, upload forms and email, including when compressing makes a file bigger.
To compress images without losing quality you can see, resize the image to the size it will actually be shown at, pick the right format (JPG or WebP for photos, PNG or lossless WebP for screenshots and graphics), then lower the quality setting step by step while comparing against the original at 100% zoom. Stop just before you can see a difference. Most of the saving usually comes from resizing, far more than from cranking quality down. Check the result every time, because re-compressing a file that was already compressed can sometimes make it bigger.
What "without visible quality loss" means when you compress images
Lossy formats like JPG and lossy WebP always throw some data away. You're aiming for loss you can't see at the size and on the screens where the image will be viewed. A product photo shown 800 pixels wide on a phone can be compressed far harder than a photo you plan to print on A4, because small, dense screens hide the blocky patches and smeared edges that a big print would reveal. web.dev makes the same point about responsive images: on small viewports "compression artifacts are not highly visible at that size and density" (web.dev).
Decide where the image is going before you touch a slider. A website hero image, a 200 KB job-application upload and an email to your family all need different settings.
Step 1: Resize first
File size depends heavily on pixel count, and modern phone cameras capture far more pixels than a web page, form or email needs. Resizing is the single most effective step, and it does no visible harm as long as you don't go below the display size.
Google's guidance is direct. web.dev's image performance guide explains that an image displayed in a 500 × 500 pixel container is optimally sized at 500 × 500 pixels, and using a 1,000 pixel square image "means that the image is twice as large as needed" (web.dev). Lighthouse's "Properly size images" audit says a page "should never serve images that are larger than the version that's rendered on the user's screen", because anything larger "just results in wasted bytes" (Chrome for Developers).
Illustrative example (simple arithmetic, not a benchmark): halving both the width and height of a 4000 × 3000 photo to 2000 × 1500 leaves a quarter of the pixels. The file won't shrink by exactly three quarters, because compression doesn't scale perfectly with pixel count, but the drop is usually large.
For a website, match the largest width the image is displayed at. If you want sharp results on high-density screens, web.dev recommends srcset and sizes so each device downloads a suitable version (web.dev). Upload forms are different: read the requirements, because many specify both pixel dimensions and a maximum file size, and you should meet the dimensions first. A photo you're emailing for someone to look at on a screen rarely needs to be wider than a typical laptop display. Keep the full-resolution originals for anything that will be printed.
The Nimclip Image Resizer lets you set exact pixel sizes with the aspect ratio locked, or pick a preset, entirely in your browser.
Step 2: Choose the right format
For photos, use JPG or lossy WebP. MDN says lossy WebP files are on average 25–35% smaller than JPEGs of visually similar compression levels, figures drawn from Google's studies (MDN). That's an average and it varies by image, so compare both if you can.
Screenshots, text and logos belong in PNG or lossless WebP. Lossy compression on sharp edges leaves fuzzy halos around letters and lines that are easy to spot. If the image has transparent areas, stick to PNG or WebP: JPG has no alpha channel, so the see-through parts get filled with a solid colour.
A photo saved as PNG is a common trap. Because PNG is lossless, a photographic PNG is often much larger than it needs to be, and changing a "quality" setting won't help, since lossless output has no quality dial. Converting it to JPG or WebP usually helps far more. Our guide to JPG vs PNG vs WebP covers this decision in detail, and the Image Converter switches formats in the browser.
Step 3: Find the quality setting by eye, not by rule
web.dev says there "isn't a universal setting suitable for all cases" and recommends experimenting "with different compression levels until you find a good compromise between image quality and file size" (web.dev). A starting point still helps.
Lighthouse's "Efficiently encode images" audit re-encodes each JPEG (and BMP) image on a page at compression level 85 and flags the image if that would save 4 KiB or more (Chrome for Developers). That doesn't make 85 a magic number, but it shows Google treats it as a reasonable level for web images. This routine works well:
- Start around 80–85 on a 0–100 scale.
- Compare the result with the original at 100% zoom, looking at fine textures (hair, foliage, fabric), smooth gradients (skies, walls) and any text.
- If you can't see a difference, lower the quality in steps of 5 and compare again.
- When banding, blockiness or smearing appears, go back up one step.
Banding is the easiest of those to catch: a blue sky that should fade smoothly turns into visible stripes of slightly different blue. Browser-based tools encode through the canvas API, where quality is a number between 0 and 1 that applies only to lossy formats such as JPEG and WebP (MDN). That's why a quality slider has no effect on PNG output.
Step 4: Strip metadata, for size and for privacy
Photos from phones and cameras carry EXIF metadata: camera model, settings, date and time, and often precise GPS coordinates. Apple's personal safety guide warns that when photos with location metadata are shared, "the people you share them with may be able to access the location metadata and learn where it was taken" (Apple Support). The FBI's guidance on EXIF data advises removing it before sharing images or posting them online, and notes that lower-quality images still contain EXIF data, because compression and metadata are unrelated (FBI).
So don't assume a compressed copy is "clean". Check whether your tool keeps or removes metadata. Re-encoding an image through a browser canvas redraws only the pixels, which means the original EXIF block isn't carried across. The Image Resizer mentioned above works this way: saving re-encodes the image and strips metadata such as GPS. Metadata is usually a small part of the file, so treat this mainly as a privacy step.
Some cameras record rotation as a metadata tag rather than rotating the pixels, so after stripping metadata, glance at the result to make sure it is still the right way up.
Why re-compressing a JPG can make it bigger
People are often surprised when a "compressed" file comes out larger than the original. It happens more than you'd expect, and it isn't a bug. Images from messaging apps, social networks or websites have usually been compressed once already. If you re-encode one at a higher quality setting than the original used, the encoder spends more bytes faithfully preserving the existing artefacts. The encoder itself also matters: the camera or the site that produced the file may have used a better-tuned encoder than the one in your browser or editor. And re-saving a PNG as PNG can't discard anything, because it's lossless, so there may be nothing left to gain.
Every lossy re-save also adds a little more damage, so compressing the same JPG over and over is a bad idea. Work from the highest-quality original you have, and always compare before-and-after file sizes. If the output is larger, keep the original. The Nimclip Image Compressor shows the real before and after size and says plainly when the output is larger.
Quick recipes
For a website
Resize to the largest displayed width (or generate several widths for srcset), use WebP for photos with a JPG fallback if needed, start at quality 80–85 and adjust by eye. Then run PageSpeed Insights or Lighthouse, which flag oversized and under-compressed images.
For a form with a size limit
Meet the required pixel dimensions first, save as JPG unless the form asks for something else (many official forms don't accept WebP), then lower quality until you're under the limit. If you hit visible artefacts before reaching the limit, I'd reduce the dimensions slightly rather than crush the quality further. For ID-style photos, follow the issuer's own specification exactly.
For email
Resize to screen size, save as JPG at a moderate quality, and remove location data if you don't want to share where the photo was taken. Check your email provider's attachment limit if you're sending many photos at once.
FAQ
What quality setting should I use for JPG?
There's no universal value. Around 80–85 is a common starting point (Lighthouse uses 85 as its reference level), but judge each image by eye and go lower if you can't see a difference.
Why is my compressed image larger than the original?
Usually because the original was already compressed at a lower quality or with a more efficient encoder. Re-encoding can't make up for that, so keep the original in that case.
Does compressing an image remove GPS location?
Not necessarily. Metadata and image quality are independent. Some tools keep EXIF data and some remove it, so check, or use a tool that re-encodes and strips metadata.
Is it safer to compress images in the browser?
Tools that process files entirely in your browser never upload them, which reduces exposure for personal photos and documents. The compressor, converter and resizer linked in this guide all work that way.
Sources
- web.dev: Image performance (Learn Performance) (checked November 2026)
- web.dev: Serve images with correct dimensions (checked November 2026)
- Chrome for Developers: Efficiently encode images (Lighthouse) (checked November 2026)
- Chrome for Developers: Properly size images (Lighthouse) (checked November 2026)
- MDN Web Docs: HTMLCanvasElement.toBlob() (checked November 2026)
- MDN Web Docs: Image file type and format guide (checked November 2026)
- Apple Support: Manage location metadata in Photos (checked November 2026)
- FBI Portland: Building a digital defense against dangers of EXIF data (checked November 2026)