Short answer
To reduce an image's file size, work through the levers in order of what they are worth. The format comes first: a photograph with no transparency is several times smaller as a JPG than as a PNG. The dimensions come second, because halving the width removes about three quarters of the pixels. The colour table (for a PNG) or the quality number (for a JPG) comes third, and is where getPNG's compressor works. Metadata comes last and is usually worth little. Zipping the file, renaming it or re-saving a JPG at maximum quality are worth nothing, or make it bigger.
A picture is heavier than it needs to be for a short list of reasons, and they are not worth the same. Some of them, the format and the number of pixels, account for nearly all the weight; others are worth a few percent; a few popular remedies are worth nothing at all. Most disappointing attempts at making an image smaller come from spending the effort on the wrong lever, running a careful pass with a clever tool over a picture that was simply saved four times larger than it is ever shown.
This guide puts the levers in order, biggest first, and says plainly which ones are not worth your time. How to compress an image covers the decision underneath all of them, whether the picture needs to keep a transparent background, so read that first if you are unsure what yours is.
The levers, in the order they pay
| Lever | What it is worth | Changes the picture? |
|---|---|---|
| The format | The largest saving when the file is in the wrong one. A 12-megapixel photograph is tens of megabytes as a PNG and about two as a JPG | Only if you go to a lossy format |
| The dimensions | About three quarters of the pixels for every halving of the width | Fewer pixels, permanently |
| The colour table (PNG) or the quality number (JPG) | Often half or more of what is left | Slightly, usually invisibly |
| Metadata | A small share on a photograph, more on a tiny file | Not a pixel |
| A lossless re-save | A few percent, up to about a third on a file saved carelessly | No |
| Zipping, renaming, or saving a JPG at 100 | Nothing, or slightly worse | No |
The order is not arbitrary. Each lever works on the output of the one before it, so a lever pulled early makes every later one cheaper, and a lever pulled late is often a lot of effort spent on bytes that were about to be removed anyway.
1. The format
Before you touch a setting, be sure the picture is in the right container. JPG stores three numbers per pixel and discards detail the eye will not miss. PNG stores every pixel exactly, and carries a fourth number, alpha, for transparency. That is why a photograph saved as a PNG is many times larger than the same photograph as a JPG with no visible difference, and why no amount of tuning a PNG optimiser closes that gap.
The rule is short. If the picture has no transparent background and is a photograph, it belongs in a JPG. If it has to be see-through, JPG is not available at any quality, because it has nowhere to store the alpha, and the choice is between PNG and, for a web page, WebP. The photo file formats guide sets out the comparison in full, and PNG vs WebP for websites covers the second choice for a site.
If you are unsure whether a cutout has been flattened somewhere along the way, a fake transparent PNG shows how to tell.
2. The dimensions
This is the lever most people skip, and it is the most reliable one after the format. File size follows the number of pixels, and the number of pixels grows with the square of the width, so the saving is much larger than the change in the width suggests.
Halve the width and height of a picture and you remove about three quarters of its pixels. A photograph saved at 4,000 by 3,000 pixels is 12 million of them; the same picture at 1,200 by 900 is about 1 million, roughly an eleventh of the pixels, before any compression setting has done anything at all. If a page shows that picture 600 pixels wide, even the 1,200 is a generous allowance: doubling the displayed width is the usual rule for staying sharp on a phone or a laptop screen with a dense display, and nothing beyond that is seen by anybody.
So the working question is not “how small can I make it” but “what is the widest this will ever be displayed”. Answer that, double it, and scale to that number in any editor or your phone’s photo app. Keep the full-size original separately, because this is the one step here that cannot be undone. getPNG’s compressor never resizes the picture it is given, on purpose, so this step is yours to take before you get there.
If a picture is the wrong size because it is too small rather than too big, that is a different problem, covered in what AI upscaling can and cannot do.
3. The colour table, or the quality number
Once the format and the dimensions are right, the third lever is the one most tools mean when they say “compress”.
For a PNG or a cutout, it is the colour table. A PNG can store a colour for every pixel, which is exact and heavy, or a table of up to 256 colours with a single number per pixel pointing into it. A cutout has plenty of soft alpha edge to protect, but it also has large areas of similar colour, so a well-chosen 256-colour table is often hard to tell from the original while the file is a half to a fifth of the size. /compress-png does this in your browser: it works out the smallest palette that still matches each picture, keeps the soft edge, never resizes, and never hands back a file larger than the one it received. If you have a number to hit rather than just a smaller file, compressing an image to an exact size covers the size limit that tool offers.
For a photograph with no transparency, the lever is the JPG quality number. Lower it and detail is discarded in small blocks, mostly where you will not look. Starting around 85 is usually indistinguishable from the original and much smaller. Go a step or two lower and check again. Past a point the blocks show up around hard edges and text, and that is where to stop. Choose the number once, on a copy: every later re-save discards a little more.
Of the three levers so far, this is the only one whose result you have to judge by eye. That is what the check at the end of this guide is for.
4. Metadata: honest about how little it is
Files carry notes besides the picture: the camera and lens, the time, sometimes the place, a thumbnail, a colour profile, the software that last touched it. It is natural to assume that stripping them is a big saving, and on a photograph it is usually not. The notes are a small share of the file next to millions of pixels, and the PNG size guide puts them at usually small and occasionally large.
It matters more on a small file. An icon, a thumbnail or a small avatar can carry a colour profile or an embedded preview that is a real fraction of everything in it. And there is a separate reason to remove the notes that has nothing to do with size, which is that they can say when and where a photo was taken. /remove-exif-data reads what a file is carrying and takes it out without re-encoding: the picture’s own bytes are copied across untouched, so there is no fresh round of JPG compression and no change to the width or height.
Two things are worth keeping by default. The colour profile says how the numbers turn into colours, and removing it can shift them. The orientation tag is what turns a phone photo the right way up. That tool keeps both unless you untick them.
The levers that are worth nothing
Some popular remedies do nothing, and a few do harm.
- Zipping the picture. JPG, PNG, WebP and AVIF are already compressed, and there is little left for a zip file to find. The result is within a whisker of the original size, sometimes a little bigger. Zip files are for sending several pictures as one, not for making any of them lighter.
- Saving a JPG at 100. The top of the quality scale keeps nearly everything, which is a large file. It does not restore what an earlier save discarded, it only stores the already-damaged picture more expensively.
- Renaming or changing the extension. Calling a PNG a JPG does not change what is inside it. A converter that actually re-encodes the picture is a different thing, and is only useful if the format was wrong to begin with.
- Running a lossless optimiser on a photograph. It changes no pixel, which is the point, but a photograph gives it almost nothing to find. A few percent is a typical result, and up to about a third on a PNG that an app saved carelessly.
- Compressing the same file over and over. Each pass on a lossy format loses a little more, and each pass on a palette PNG has less left to give. If the first pass did not do enough, a different lever is needed, not another pass of the same one.
When it will not shrink further
Some pictures are near their floor. A PNG that is already a small palette has had its colour work done, and only resizing or a different format will help. A photograph of a busy scene, such as foliage or a crowd, has detail everywhere, so even a moderate quality number leaves a large file. And a very large picture asked to fit a very small budget will not get there on quality alone, because past a point the size is set by the number of pixels rather than how each is stored. The dimensions are the lever that is large enough to matter then, which is why they come second and not last.
Find out which lever your picture is really waiting on
- Take one photograph or cutout and note its file size and its width in pixels.
- Resize a copy to half that width in any editor and note the new file size.
- Drop the original on /compress-png if it needs transparency, or save a copy as a JPG at quality 85 if it does not, and note that size too.
You should see: the half-width copy is roughly a quarter of the original, and the palette or quality copy is a good deal smaller too. Whichever one dropped the most is the lever this picture was waiting on, and it is the one to pull first for the rest of a batch that looks like it.
If you do not: if neither dropped much, the picture was already small in pixels and already in a suitable format. Look at metadata next, and beyond that accept that it is near its floor.
The free way
The transparent half of this job
getPNG’s compressor works out the smallest colour palette that still matches each picture, keeps a cutout’s soft edge, and does a whole folder at once, with nothing uploaded. It never resizes the picture and never returns a file larger than the one you gave it, so the dimensions lever stays in your hands.
The short version
Get the format right, then the dimensions, then the colour table or the quality number, then metadata if the file is small enough for it to matter. Skip the zip file, the maximum-quality re-save and the rename, and keep the original before you start, because resizing and lossy compression cannot be undone once the larger file is gone.
The steps, in short
- Check the format before anything else. A photograph with no transparent background belongs in JPG. A cutout, logo or screenshot that needs transparency stays PNG or WebP. Changing format is the biggest single saving when the file is in the wrong one.
- Resize to the size it is shown at. Work out the widest the picture will ever be displayed, double it for sharp phone and laptop screens, and scale down to that. Keep the full-size original safe, because this is the one step you cannot undo.
- Cut the colour table or lower the quality. For a PNG or a cutout, drop it on getPNG's compress-png tool, which picks the smallest palette that still matches the picture. For a photograph, lower the JPG quality a step at a time and check the edges.
- Strip metadata if it is a large share. Camera notes, thumbnails and colour profiles add bytes. On a photograph they are small next to the pixels; on a tiny icon they can matter. getPNG's metadata remover takes them out without re-encoding the picture.
- Compare the file sizes, then look at the edges. Read the before and after size, then zoom to 200 percent on a soft edge or a line of text. Stop at the last setting where nothing looks different.
Questions
What is the fastest way to reduce an image's file size?
Resize it to the size it will actually be shown at. File size follows the number of pixels, and pixels grow with the square of the width, so a picture saved at 4,000 pixels wide and shown at 1,000 carries sixteen times the pixels anyone sees. Every other lever works on what is left after that, which is why it comes before them.
Does zipping an image make it smaller?
Almost never. JPG, PNG, WebP and AVIF are already compressed formats, and a zip file tries to find patterns that have already been squeezed out. The result is usually within a whisker of the original size, sometimes a little larger. Zipping is useful for sending many files as one, not for making any one of them lighter.
Will resaving a JPG at 100 percent quality keep the file small?
No. The quality number is a trade between detail and size, and the top of the scale keeps almost everything, which is a large file. Saving an already-compressed JPG at maximum quality does not restore what the first save discarded, it only stores the damaged picture more expensively. Lower the number instead, once, on a copy of the original.
Does removing metadata reduce file size much?
On a photograph, usually by a small share, because the pixels dominate. It matters more on a small file such as an icon or a thumbnail, where a colour profile or embedded preview can be a real fraction of the total. It is worth doing for privacy anyway, since the notes can include the time and place a photo was taken. getPNG's remove EXIF tool copies the picture's own bytes across untouched, so nothing is re-compressed.
Can I reduce an image's file size without losing quality?
Partly. Removing metadata and running a lossless optimiser change no pixel, but the saving is modest. The large savings come from resizing or reducing colours or quality, all of which change the file. Done to the size a picture is really shown at, most of that change is invisible, but it is a change, and it is worth keeping the original before you start.
How do I make a transparent PNG smaller without losing the transparency?
Resize it to the size it is shown at, then reduce its colour palette, which keeps the alpha channel. getPNG's compress-png tool does the second step in your browser, never resizes the picture itself, and never hands back a file larger than the one it was given. Saving as a JPG would shrink it more, but deletes the transparency, so it is only right when nothing needs to be see-through.