How to Compress an Image Without Losing Quality: Lossless, Lossy and What Works
Lossless versus lossy, what PNG, JPEG, WebP and HEIF each do, and the steps that keep a photo looking the same as it shrinks.
Quick answer
Only lossless compression, such as PNG or lossless WebP, keeps every pixel. JPEG is lossy by design, so each save discards some detail. For photos, a high-quality lossy copy at a sensible size usually looks the same and is far smaller.
- Truly lossless
- PNG and lossless WebP keep every pixel. Removing metadata from a JPEG also shrinks it without touching the picture data.
- Looks the same
- A JPEG or WebP saved at high quality from the original. Compare at full size before you delete anything.
- Biggest lever
- Fewer pixels. Halving the width and height leaves a quarter of the pixels, which shrinks the file more than any quality setting.
- When to use a vault
- When the full-quality originals should be kept on the phone behind their own code while smaller copies are shared.
Best overall: Stash
Photos keeps full-quality originals, but in a library that syncs with iCloud Photos and opens for anyone who knows the phone's passcode. Stash keeps chosen originals apart: a working calculator whose PIN opens a vault, with every item encrypted on the iPhone with AES-256 before it is saved. Photos moved there are not uploaded by iCloud Photos, so the originals stay put while compressed copies go out. Stash is free to download with no ads, so private originals can move in straight away.
Lossless and lossy: the two kinds of compression
Every image format shrinks pictures in one of two ways.
Lossless compression stores the picture more efficiently without changing it. Decode the file and you get exactly the pixels that went in. The W3C describes PNG as a format for "the lossless, portable, well-compressed storage of static and animated raster images" (PNG Specification, Third Edition, W3C Recommendation of 24 June 2025).
Lossy compression throws away detail the eye is unlikely to notice, and in exchange makes files much smaller. The JPEG committee describes the original JPEG standard (ISO/IEC 10918-1, ITU-T T.81) as "the well-known Huffman-coded DCT based lossy image format" (JPEG 1 overview, as of 2 December 2026). Every time a JPEG is encoded, some information is discarded; there is no setting that turns this off.
So the literal answer to "can I compress an image without losing quality" is: yes, with a lossless format, and the savings on photos are modest. The practical answer for photos is usually a high-quality lossy copy that looks the same at normal viewing size.
What each format does
| Format | Compression | Best for | Note |
|---|---|---|---|
| PNG | Lossless | Screenshots, graphics, text, transparency | Photos saved as PNG are often larger than the JPEG they came from |
| JPEG | Lossy | Photos that must open everywhere | No transparency; every save discards some detail |
| WebP lossless | Lossless | Graphics on the web | Google: "26% smaller in size compared to PNGs" |
| WebP lossy | Lossy | Photos on the web | Google: "25-34% smaller than comparable JPEG images at equivalent SSIM quality index" |
| HEIF (iPhone HEIC) | Lossy | iPhone camera default | Apple: better compression than JPEG, so it uses less storage |
The WebP figures are from Google's WebP overview, which also says lossless WebP supports transparency "at a cost of just 22% additional bytes." The HEIF line is from Apple's Using HEIF or HEVC media on Apple devices, both as of 2 December 2026. SSIM is a common measure of how similar two images look; equal SSIM means roughly equal visible quality.
Why the same JPEG gets worse with each save
A JPEG is already the result of lossy compression. Open it, change nothing, and save it again as JPEG: the encoder works on a picture that has already lost detail, and discards some more. Do that a few times and edges grow soft halos and flat skies show blocks.
Three habits avoid this:
- Always start from the original. Compress from the camera file, not from a copy that was already shrunk, emailed or downloaded from a chat.
- Compress once, to the final size. Several small steps lose more than one step to the same size.
- Keep the original. Make a compressed copy for sharing and leave the source untouched.
The levers, from biggest to smallest
1. Pixel dimensions. File size follows the number of pixels. Halving the width and the height leaves a quarter of the pixels. A photo meant for a phone screen rarely needs more than about 2,000 pixels on its long side. The image resizer on this site sets exact dimensions or a percentage.
2. Format. For a photo, WebP lossy is smaller than JPEG at the same visible quality, per Google's figures above. JPEG opens everywhere. PNG is the wrong choice for a photo unless it must be lossless.
3. Quality setting. On a lossy format, a high setting keeps the look and still cuts the size compared with a camera original. The number is an encoder setting, not a standard score: 80 in one program does not mean 80 in another, so judge the result by eye.
4. Metadata. Camera details, GPS and thumbnails take space too. Removing them from a JPEG or PNG is lossless: the picture data is not touched. The saving is small, but it is the one change that costs no quality at all.
How to compress a photo without visible loss
The free image compressor on this site works in the browser tab, on iPhone or computer, with no upload and no account.
- Open the image compressor in Safari (or any current browser on a computer).
- Choose a target size that suits the use, for example 1 MB for sharing a detailed photo.
- Pick WebP for the web or JPEG when the file must open everywhere. Choose WebP for images with a transparent background; JPEG turns transparent areas white.
- Choose the original photo, not a copy that was already compressed.
- Compare the size before and after. The tool tries quality levels and keeps the best-looking version that fits the target.
- Open the result at full size and look at faces, skies, fine text and hair. If you see blocks or smearing, raise the target and run it again.
- Download the copy and keep the original.
Two things to know about the tool: if low quality alone cannot reach the target, it also reduces the pixel dimensions and tells you so, and photos above 16.8 megapixels are scaled down to that size first. For a full-resolution copy of a larger photo, set a target big enough that no reduction is needed, or keep the original.
The lossless route
For a JPEG or PNG, the photo metadata tool saves a copy with the metadata blocks left out and the compressed picture data copied byte for byte. That is a smaller file with exactly the same pixels. The one exception is a JPEG stored sideways with a rotation flag, which is redrawn upright at 92% quality.
Settings on iPhone that affect quality
The iPhone makes its own choices about formats. Three Apple settings decide whether a photo is converted along the way, per Apple's HEIF page and the iPhone User Guide, as of 2 December 2026 (iOS 27):
- Camera format. Settings > Camera > Formats: High Efficiency saves HEIF, which takes less space; Most Compatible saves JPEG. Apple says "All new photos and videos will now use JPEG or H.264 format" after the switch.
- Transfers to a computer. Importing over USB may convert photos to JPEG. To prevent that, go to Settings > Apps > Photos and tap Keep Originals.
- Sharing. In the Share Sheet, tap Options. Apple's guide says to "tap Current to prevent a file format conversion," while Most Compatible means "files may convert to JPEG or MOV" (Share photos and videos on iPhone).
A conversion from HEIF to JPEG is one more lossy encode. If quality matters, send with Current and convert once, yourself, with a known quality setting; the HEIC to JPG converter on this site has a quality slider and defaults to 90%.
When the built-in tools are enough
You do not need a compressor at all when:
- The photo stays on your devices and storage is not a problem.
- The recipient can open HEIC and you share with Current, so nothing is converted.
- A service you upload to compresses the image anyway, in which case a second, earlier compression only adds loss.
- You send through a link, such as iCloud, Google Drive or OneDrive, where file size limits are generous.
When you need more than the built-in tools
A deliberate compressed copy helps when:
- A form or mailbox caps the size, often at a few hundred kilobytes or a few megabytes.
- A website needs fast pages, where WebP at a sensible pixel size is the usual choice.
- You want control over the one lossy step, instead of letting each app convert on its own.
- The originals are private. A compressed copy can be shared while the full-quality original stays where only you can open it.
How to keep full-quality originals with Stash
Stash looks and works like a calculator. A PIN you choose opens the vault, and items are encrypted on the iPhone with AES-256 before they are saved, with the key kept in the iOS Keychain.
- Install Stash on an iPhone or iPad with iOS 15 or later, choose a PIN and save the recovery key that Stash shows once during setup.
- Make the compressed copies you want to share first, from the originals in Photos.
- In the vault, tap + and import the originals. Stash copies them in.
- In Photos, delete the originals, then empty Utilities > Recently Deleted so they also leave iCloud Photos.
- When you need an original back out, use Save to Photos or Export to iCloud Drive / Files in Stash's settings, then compress from that copy.
The originals then stay behind the calculator and its PIN, outside the Photos library, and every compressed copy starts from the best source.
FAQ
Can you compress an image without losing any quality?
Yes, with lossless compression: PNG, lossless WebP, or removing metadata from a JPEG. The savings on photos are modest compared with lossy compression.
Is WebP better than JPEG?
For size, usually. Google says lossy WebP is 25 to 34% smaller than JPEG at equal SSIM quality. JPEG is the safer choice when the file must open in older software.
Why did my photo get bigger as a PNG?
PNG is lossless and stores every pixel exactly, while a photo from a camera is already lossy compressed. Saving it as PNG keeps all the pixels of that version, which takes more space.
What quality setting should I use for JPEG?
There is no universal number, because each program's scale differs. Start high, compare at full size, and lower it only while you cannot see a difference.
Does resizing reduce quality?
It removes pixels, so fine detail goes, but at normal viewing size a resized photo often looks identical. It is the most effective way to make a file smaller.
Does converting HEIC to JPG lose quality?
A little, since JPEG is lossy. At 90% or higher the difference is rarely visible in normal viewing. Convert once, from the original.
Does compressing remove metadata?
With the image compressor on this site, yes: the copy is drawn from the pixels only, so it has no camera, date or GPS data.
The Bottom Line
To compress an image without losing quality, know which kind of compression you are using. JPEG is lossy by design, so every JPEG save discards some detail; only lossless formats such as PNG and lossless WebP, or removing metadata, keep every pixel. For photos, lossless saves little, which is why the usual answer is one careful lossy step: from the original, to a sensible pixel size, in WebP or JPEG, checked at full size.
The format table above shows where each option fits. Fewer pixels shrink a file more than any quality slider, and repeated saves lose more than one. Keep the original untouched, make the compressed copy from it, and give the originals that are private a lock of their own.
·Written by the developer of Stash
Save this guide
Download this guide as an image