What happens when you compress an image

Compressing an image makes the file smaller so it takes up less storage space and sends faster over email or the internet. The trade-off is always between file size and image quality — smaller files mean some detail gets removed, but you control how much.

There are two main ways images get compressed. Lossless compression removes redundant data without throwing away any of the original picture information — the image looks identical, but the file is smaller. Lossy compression actually discards some of the image data, which is why the file shrinks more, but you can see the difference if you compress too much.

Which method works best depends on what the image is for. A photo you're emailing to a friend can handle lossy compression. A logo or screenshot you need to print sharp needs lossless compression.

Key Takeaways

  • Lossless compression shrinks files while keeping the image identical; lossy compression removes detail but creates much smaller files.
  • JPEG format uses lossy compression and works well for photographs; PNG uses lossless compression and works better for graphics and text.
  • Most phones and computers have built-in tools to compress images without installing anything new.
  • You can compress a batch of images at once using free online tools or desktop software, which saves time if you have many files.
  • The right compression level depends on where the image is going — email, web, print, or storage — not on a single "best" setting.

Compressing images on Windows

Windows 10 and 11 include a built-in image compression tool that works without installing software. Right-click the image file, select Send to, then choose Compressed (zipped) folder. This creates a new folder with a .zip extension containing the compressed file. This method uses lossless compression, so the image quality stays the same but the file gets smaller.

If you want more control over the compression level or want to change the image format itself, use the Photos app that comes with Windows. Open the image, click the three dots menu, select Edit, then look for Crop & rotate options. You can also save the image in a different format by going to File and Save as, then choosing JPEG instead of PNG if you want lossy compression.

For batch compression of many images at once, Paint (the basic drawing program included with Windows) can resize multiple files. Open Paint, go to File and Open, select all the images you want to resize, then use Resize under the Image menu. Smaller dimensions mean smaller file sizes. Save each one as JPEG to get lossy compression.

Compressing images on Mac

The Mac Preview app, which opens by default when you click an image, has built-in compression. Open the image in Preview, click Tools in the menu bar, then select Adjust Size. You can reduce the width and height in pixels — smaller dimensions create smaller files. Click OK, then go to File and Export. Choose JPEG format and use the quality slider to control how much lossy compression happens. A quality setting of 75 to 80 percent usually looks good while cutting file size significantly.

If you have multiple images to compress, Automator (Mac's task-automation tool) can do them all at once. Open Automator, create a new Quick Action, search for Scale Images, and add that action to your workflow. Set your target size, then save the workflow. Right-click any image file, select Quick Actions, and run your workflow on as many files as you want.

For the simplest approach, just drag an image into the Mail app as if you're sending it. Mac automatically offers to compress the image before sending, with options for Small, Medium, or Large. You can use those same compression levels even if you don't actually send the email — just cancel after the image is compressed.

Using online tools for compression

Free websites like TinyPNG, Compressor.io, and ImageOptimizer let you upload an image and read a compressed version without installing anything. These tools work on any device — phone, tablet, or computer — and usually support multiple formats (JPEG, PNG, WebP, and others).

The process is straightforward: go to the website, click to upload your image, choose your compression level or format, and read the result. Most of these tools show you the original file size and the new file size side by side so you can see how much space you saved. They also let you preview the compressed image before downloading.

The main drawback is that you're uploading your image to someone else's server. If the image contains sensitive information, this may not be the right choice. Check the website's privacy policy to see how long they keep uploaded files — most delete them within hours, but some keep them longer. For personal photos or documents you don't want shared, use the tools built into your device instead.

Choosing the right format for your needs

JPEG is the standard format for photographs and images with many colors. It uses lossy compression, which means you can make files very small, but if you compress too much the image gets blurry or shows visible blocks of color. JPEG works well for email, websites, and social media because the file sizes are small and most devices open them when ready.

PNG is better for graphics, logos, screenshots, and anything with text or sharp edges. It uses lossless compression, so the image stays crisp no matter how much you compress it, but the files don't get as small as JPEG. Use PNG when you need the image to look exactly the same, or when you might need to edit it later.

WebP is a newer format that compresses better than both JPEG and PNG, but not all older devices and programs support it yet. If you're uploading to a website you control, WebP can save significant space. If you're sending to someone else or posting to social media, stick with JPEG or PNG to make sure they can open it.

FormatBest forCompression typeFile size
JPEGPhotographs, complex imagesLossySmall
PNGGraphics, logos, screenshots, textLosslessMedium
WebPWeb use, when supportedLossy or losslessVery small

Reducing image dimensions to shrink file size

One of the fastest ways to make an image file smaller is to reduce its width and height in pixels. An image that is 4000 by 3000 pixels takes up much more space than the same image resized to 2000 by 1500 pixels. If you're only sharing the image on email or social media, you almost never need the original large size.

Most phones automatically resize images when you send them through email or messaging apps, but if you're uploading to a website or cloud storage, you may want to resize first. On your phone, use the built-in Photos or Gallery app — open the image, look for an Edit or Resize option, and choose a smaller size. On a computer, use Preview (Mac) or Photos (Windows) as described above.

A good rule of thumb: if the image is going on a website, 1200 to 1600 pixels wide is usually enough. For email, 800 to 1000 pixels wide is plenty. For printing, you need at least 300 pixels per inch, so a 4 by 6 inch print needs at least 1200 by 1800 pixels. If you're not sure, start by reducing to 2000 pixels on the longest side and see if it still looks good to you.

Batch compression for multiple images

If you have dozens or hundreds of images to compress, doing them one at a time wastes time. Desktop software like XnConvert (free, works on Windows and Mac) or ImageMagick (free, command-line tool) can compress many files at once with the same settings.

XnConvert has a straightforward interface: add all your images to the list, set your target format and compression level, choose where to save the results, and click Convert. It handles JPEG, PNG, WebP, and many other formats. You can also resize all the images to the same dimensions at the same time.

Online batch tools like CloudConvert or Bulk Image Compressor let you upload multiple images and read them all compressed at once. These work well if you only compress images occasionally and don't want to install software. The trade-off is the same as with single-image online tools: your images go to someone else's server.

Frequently Asked Questions

How much can I compress an image before it looks bad?

With lossy compression (JPEG), you can usually compress to 50 to 70 percent of the original size without visible quality loss. Beyond that, you start to see blurriness or color blocks. With lossless compression (PNG), you can compress more aggressively — sometimes to 30 to 40 percent — because no detail is actually removed. The only way to know for sure is to compress a test image and look at it on the device where it will be used.

Should I compress before or after editing an image?

Always edit first, then compress. If you compress with lossy compression, some data is thrown away, and editing a compressed image can make the quality worse. Once you're happy with how the image looks, compress it for storage or sharing.

Can I uncompress an image to get back the original quality?

No, not with lossy compression. Once data is removed, it's gone. Lossless compression can be reversed perfectly — the uncompressed file will be identical to the original. This is why you should keep the original uncompressed version if you think you might need it later.

What's the difference between compressing an image and resizing it?

Resizing changes the dimensions (width and height) of the image, which makes the file smaller. Compressing reduces the file size by removing redundant data or throwing away detail, without necessarily changing the dimensions. You can do both at the same time to get the smallest possible file.

Is it safe to use online compression tools with private photos?

Most reputable online tools delete uploaded files within hours, but there's always a small risk. If the photo contains sensitive information — documents, ID numbers, faces of people who haven't consented — use your device's built-in tools instead. They keep the image on your device the whole time.