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 a visible loss in quality, do three things. First, resize the image to the size it will actually be shown at. Second, pick the right format: JPG or WebP for photos, PNG or lossless WebP for screenshots and graphics. Third, lower the quality setting step by step and compare it with the original at 100% zoom. Stop just before you can see a difference. Most of the saving usually comes from resizing, not from turning quality down. Check the result every time. Compressing a file that was already compressed can sometimes make it bigger.
How much loss is too much
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 much harder than a photo you plan to print on A4. Small, sharp phone screens hide the blocky patches and smeared edges that a big print would show. 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". Anything larger, it says, "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. The drop is usually large, though.
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. Many of them set both pixel dimensions and a maximum file size, so read the requirements and 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 leaves fuzzy halos around sharp letters and lines, and they are easy to spot. If the image has transparent areas, stick to PNG or WebP. JPG has no transparency, so the see-through parts get filled with a solid color.
A photo saved as PNG is a common trap. PNG is lossless, so a photo saved as PNG is often much larger than it needs to be. Changing a "quality" setting won't help, because 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-saves each JPEG (and BMP) image on a page at compression level 85. It 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 save images through the canvas API. There, quality is a number between 0 and 1, and it only applies 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 about sharing photos with location data: "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 you share or post images. It also notes that lower-quality images still contain EXIF data, because compression and metadata are separate things (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. If you want to strip location data without re-compressing at all, a metadata remover copies the JPG, PNG or WebP picture data unchanged (that one processes the file on Nimclip's server and deletes it after 30 minutes).
Some cameras store rotation as a metadata tag instead of rotating the pixels. After you strip metadata, check that the photo 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 save one again at a higher quality than the original used, the file spends more bytes keeping the flaws it already has. The encoder matters too. The camera or site that made the file may have used a better encoder than the one in your browser or editor. And saving a PNG as PNG again can't remove anything, because PNG is 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.
A quick test shows how little room an already compressed JPG has left. We ran a 1200 x 627 px stock photo, already a 53.7 KB JPG, through the Image Compressor at quality 75 with no resize. It came out at 50.8 KB, only 5% smaller, because the file had been compressed hard before we got it. A photo straight from a phone or camera usually has far more room, and resizing it first (Step 1) saves the most.
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, since many official forms don't accept WebP. Then lower the quality until you're under the limit. If flaws show up before you reach the limit, reduce the dimensions a little instead of lowering quality further. A target-size compressor automates that loop: you type the limit, and it lowers quality, then pixel size, until the file fits. For ID-style photos, follow the issuer's own specification exactly; our passport photo sizes by country page lists the official numbers.
For email
Resize to screen size and save as JPG at a medium quality. 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?
Start at 80 to 85 and follow the routine in Step 3; the right number depends on the picture.
Does compressing an image remove GPS location?
Not necessarily, as Step 4 explains. Check what your tool does with EXIF data.
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 Image Compressor, Image Converter and Image Resizer linked above all work that way. The metadata remover and the target-size compressor upload the file instead, and delete it after 30 minutes.
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)