What image compression actually does
Compressing an image makes the file smaller so it takes up less storage space and uploads or downloads faster. The image itself stays the same size on your screen — compression reduces the data behind it, not the dimensions. There are two main ways to compress: lossy compression, which throws away some image information to shrink the file dramatically, and lossless compression, which keeps all the original information but uses smarter storage methods.
Which one you use depends on what the image is for. A photo you're emailing to a friend can handle lossy compression because small quality loss is invisible at normal viewing sizes. A logo or graphic you might resize later should use lossless compression so you don't degrade it. Most image tools let you choose which method and how aggressively to compress.
Key Takeaways
- Lossy compression shrinks files much more but loses some image detail; lossless compression keeps all detail but shrinks less.
- JPEG format uses lossy compression by default and works well for photographs; PNG uses lossless and works better for graphics and images with text.
- You can compress in most image editors by exporting or saving as JPEG and adjusting the quality slider, usually between 70 and 85 for photos.
- Online tools like TinyPNG, Squoosh, and ImageOptim let you upload and compress without installing software, and show you the file size before and after.
- Batch compression tools can shrink dozens of images at once, which saves time if you're preparing many photos for a website or email.
Using JPEG format for photographs
JPEG is the standard format for photographs because it compresses well and looks good at smaller file sizes. When you save or export an image as JPEG in any image editor — Photoshop, GIMP, Preview on Mac, or Paint on Windows — you'll see a quality slider. A setting of 80 to 85 is usually the sweet spot: the file shrinks to a quarter or fifth of the original size, but the image still looks sharp on a screen.
Lower quality settings (60 to 70) compress more but start to show visible artifacts — blocky areas or color banding, especially in gradients or skies. Higher settings (90 to 95) keep more detail but don't shrink the file much, so you're not gaining much. Test by exporting at different settings and comparing the result at full screen size, not zoomed in. What looks acceptable at normal viewing distance is what matters.
Using PNG format for graphics and images with text
PNG uses lossless compression, so it's the right choice for logos, screenshots, diagrams, and anything with text or sharp edges. The file won't get as small as a JPEG, but you won't lose any detail. PNG also supports transparency — you can have a transparent background instead of a solid color, which is useful for graphics you'll place on different backgrounds.
PNG files are larger than JPEG for the same image, so use PNG only when you need what it offers. If you're compressing a PNG, most tools won't shrink it much further without converting to JPEG and accepting quality loss. Some online tools like TinyPNG can optimize PNG files by removing unnecessary data, but the gains are usually modest — 10 to 20 percent smaller, not the dramatic shrinking you get with JPEG.
Online compression tools that don't require software
If you don't want to install image editing software, several free online tools compress images in your browser. Squoosh (squoosh.app) lets you upload an image, choose between lossy and lossless, adjust quality, and see the file size before you download. TinyPNG (tinypng.com) specializes in PNG and JPEG and compresses automatically; you upload, it shrinks, you download. ImageOptim (imageoptim.com) works in your browser and shows you exactly how much data it removed.
These tools are fast for one or two images. You upload, adjust settings if the tool offers them, and download the compressed version. None of them store your images — they process and delete them. They're useful if you're on a computer where you can't install software, or if you just want to compress a single photo without learning an editor.
Batch compression for multiple images at once
If you're preparing dozens of photos for a website or need to shrink a folder of images, batch tools save time by processing many files at once. ImageMagick is a command-line tool for Windows, Mac, and Linux that can compress hundreds of images in seconds, though it requires typing commands. XnConvert (xnconvert.com) is a desktop program with a graphical interface where you drag a folder of images in, set compression options, and let it run.
Most image editors also have batch or automation features. In Photoshop, you can use the Image Processor to resize and compress multiple files. In GIMP, you can write a script to do the same. For casual users, online batch tools like Bulk Image Compressor (bulkimagecompressor.com) let you upload multiple images at once and download them all compressed, though there are usually limits on how many or how large.
Choosing the right balance between file size and quality
The goal is the smallest file that still looks good for its purpose. A thumbnail for a website can be much more compressed than a full-size image someone might print. A photo for email should be smaller than one for social media. Start by thinking about where the image will be seen and how large it will appear.
For web images, aim for files under 500 KB for a full-size photo and under 100 KB for a thumbnail. For email, keep photos under 1 MB total so they don't bounce or take forever to send. For social media, each platform has different limits and recommendations — Facebook recommends under 4 MB, but smaller uploads faster. Export at a quality setting, download the result, and check it at actual size on the device where it will be viewed. If it looks good there, you've compressed enough.
When not to compress too aggressively
Some images shouldn't be compressed heavily, even if the file gets larger. If you're keeping a master copy of a photo for future editing, use lossless compression or no compression at all — once you compress with JPEG and lose detail, you can't get it back. If you're archiving images long-term, store the original and compress only the copies you share.
Images with fine detail — like close-up photography, medical images, or artwork — show compression artifacts more obviously than casual snapshots. Test your compression settings on a sample image first. If you see blockiness, color shifts, or blurring that bothers you, use a higher quality setting or switch to lossless compression. The extra file size is worth it if the image matters.
Frequently Asked Questions
Can I compress an image multiple times without losing quality?
Not with lossy compression like JPEG. Each time you save a JPEG, you lose a little more detail. Compress once and keep the result, or always compress from the original. Lossless formats like PNG can be recompressed without loss, but the file won't get smaller the second time.
What's the difference between resizing and compressing?
Resizing changes the image dimensions — a 4000-pixel photo becomes 2000 pixels. Compressing keeps the dimensions the same but reduces file size by removing or simplifying data. Resizing usually shrinks the file more than compression alone, so do both if you need the smallest possible file.
Why does my compressed image look blurry?
You've compressed too aggressively. Lower the quality setting (for JPEG, try 80 instead of 60) or switch to lossless compression. Blurriness usually means lossy compression threw away too much detail. Test at a lower compression level and download again.
Can I compress a screenshot or graphic as much as a photograph?
No. Screenshots and graphics with text should use PNG lossless compression because JPEG will blur the text and edges. PNG won't shrink as much, but the result will be readable. If file size is critical, resize the image smaller instead of compressing harder.
Do I need to compress images for social media?
Social media platforms compress images automatically when you upload, so heavy pre-compression isn't necessary. A reasonably sized file (under 5 MB) will upload fine and the platform will optimize it for you. Compress mainly if you want faster uploads or have a slow connection.