Open your image in GIMP, go to File, Export As, type a .png filename and click Export. A dialog appears, and the short answer to how to compress png in gimp is that the most obvious control is not the one that will shrink your file. This article explains each setting and gives you the order of operations that produces a small PNG without destroying quality.

What the Compression Level Slider Does and Does Not Do

The dialog has a Compression level slider from 0 to 9. It is entirely lossless. Level 9 runs the DEFLATE algorithm at maximum effort and is slower. The file it produces is slightly smaller than level 0, but the difference is small. Typical savings from going to level 9 are 5 to 15 per cent on an image that has never been optimised. On an already optimised file the saving can be zero. The slider never reduces the number of colours and never discards pixels. It is a lossless optimiser, not a compressor in the way JPEG is.

PNG is always compressed and always lossless. There is no uncompressed PNG. The format uses two stages: filtering and DEFLATE. Filtering predicts each pixel from its neighbours and stores the difference. DEFLATE then compresses those filtered bytes. The slider only controls how hard DEFLATE works. It cannot fix the fundamental problem that makes PNG files large, which is photographic noise or smooth gradients that produce unpredictable pixel values.

If you have a photograph stored as PNG, the compression slider will barely touch it. A photo as PNG is roughly ten times the size of the same photo as JPEG at a quality difference invisible at normal viewing distance. The honest answer for a photograph is to change format, not to wrestle with the slider.

The Real Savings Are in Indexed Mode

Open the Image menu, go to Mode, and choose Indexed. This is palette reduction. It is lossy. It rebuilds the image from an adaptive palette of at most 256 colours. Each pixel needs 7 or 8 bits instead of 24 or 32, and thousands of near identical shades collapse into one entry. That creates exactly the repetition that DEFLATE feeds on. The savings are dramatic. A UI screenshot shrinks 70 to 85 per cent. A logo or icon shrinks 60 to 80 per cent. A chart or diagram shrinks 70 to 80 per cent. An illustration with gradients shrinks 40 to 65 per cent. A photograph stored as PNG shrinks 40 to 70 per cent. Compare that to the 5 to 15 per cent from the compression slider alone.

In the Indexed Color Conversion dialog, choose Generate optimum palette. Set the maximum number of colours. For most web images 256 is safe. For a logo with flat colours you can go lower. Click Convert. Then export the image as PNG. That is how to compress a PNG in GIMP effectively. The compression slider on the export dialog is still there, and you should set it to 9, but the heavy lifting was done by the palette reduction.

GIMP Indexed Mode PNG: How it Works and When to Use it

Indexed mode produces a PNG 8 file. The palette holds a maximum of 256 colours. Transparency is handled by a tRNS chunk, one alpha value per palette entry. The file carries exactly the colours you told it to keep. This is the same technique that TinyPNG and pngquant use. It is the single most effective thing you can do to reduce a PNG file size in GIMP.

There are two failure modes. The first is banding in smooth gradients. A soft fade needs many closely spaced colours to look continuous. If you give it 64 colours you will see steps. The fix is to use a higher colour count. The second failure mode is a stair step fringe on semi transparent edges. The soft alpha band around a rounded logo needs enough palette entries or it snaps into discrete steps. This shows worst on curves and diagonals. A gentler setting, meaning more colours, fixes it.

Palette reduction cannot be undone. Keep the original file and compress a copy. Compressing an already palette reduced file again gives a worse result than going to the low colour count once, because the second pass chooses from an already impoverished set. Lossless re compression is safe to repeat. Indexed mode is the answer to the question gimp how to compress png for real world web use.

GIMP PNG Compression Level: the Right Setting for Your Export

Set the slider to 9. It costs only time. The file will be as small as the lossless stage can make it. If you are exporting dozens of files and speed matters, drop to 6. The difference is a few per cent. The compression level is not where you should look for big savings. It is a finishing step, not the main event. The answer to the question how to compress png gimp is not the slider. It is indexed mode plus the slider set to 9.

The dialog also has checkboxes for metadata: background colour, gamma, layer offsets, resolution, creation time and comments. Uncheck every one you do not need. Stripping metadata costs nothing and shrinks the file. These are lossless changes. Metadata chunks can be removed without affecting a single pixel.

Adam7 interlacing makes a PNG progressively load but increases its size. Skip it unless you need the progressive display. Interlacing adds bytes to every file.

What Do GIMP's PNG Export Settings Actually Do?

Here is the complete list and the effect of each:

  • Compression level (0 9): Controls DEFLATE effort. Lossless. Set to 9.
  • Save background color: Writes a chunk with the canvas colour. Uncheck it unless you need it.
  • Save gamma: Writes a gamma value for display correction. Uncheck it for web use.
  • Save layer offset: Writes position data for layers. Uncheck it on a flattened image.
  • Save resolution: Writes dots per inch. Uncheck it. The web does not use it.
  • Save creation time: Writes a timestamp. Uncheck it.
  • Save comment: Writes any embedded text. Uncheck it.

None of these affect pixel data. They are metadata. Stripping them is the cheapest optimisation you can do. The real reduction comes from indexed mode, which you do before the export dialog ever appears. That is the order: scale the image to the display size first, then go to Image, Mode, Indexed, then export with the slider at 9 and every metadata checkbox unchecked.

When Indexed Mode Hurts and What to Do Instead

Indexed mode is wrong for three kinds of image. The first is a photograph. A photo has thousands of colours. Forcing it into 256 produces visible posterisation. The second is a high quality illustration with a long smooth gradient. The third is any image you intend to edit further. Palette reduction throws away colour information. Edit first, reduce second.

For a photograph stored as PNG the honest answer is to change format. JPEG at a quality of 85 will be a tenth the size and look identical at normal viewing distance. WebP lossless is about 26 per cent smaller than PNG and supports a full alpha channel. WebP is supported by all current browsers. Some older desktop applications still cannot open it. If you must keep PNG, scale the image down. File size scales with pixel count. Doubling the width quadruples the data. An image displayed at 800 pixels wide and stored at 3000 carries roughly fourteen times the pixel data anyone will see. Resize before compressing. Compressing pixels you are about to discard is wasted work and the compressor performs better on the smaller image.

The Full Workflow for a Small PNG

Start with the original. Duplicate it or keep a backup. Palette reduction cannot be undone. Scale the image to the display size. For a blog image aim for about 1600 pixels on the long edge. For full screen use aim for about 2560 pixels. For high density screens serve about twice the display width. Then go to Image, Mode, Indexed. Choose Generate optimum palette. Set the colour count. For most web images 256 is safe. Click Convert. Then go to File, Export As, type a .png filename, and click Export. Set the compression level to 9. Uncheck every metadata checkbox. Click Export.

That is the entire workflow. It produces a file that is as small as GIMP can make it without losing more quality than the palette reduction itself. The order matters. Stripping metadata first, then reducing the palette in steps, then reducing dimensions, then changing format is the cheapest order of operations. If you need the file even smaller, reduce the colour count in the Indexed dialog. 128 colours on a screenshot is often invisible. 64 colours on a logo is usually fine. 32 colours on line art works. Below that the image breaks up visibly. Realistic outcomes for a screenshot or graphic: 500 KB easy with no visible change, 200 KB easy on most images, 100 KB achievable and may need slight downscaling, 50 KB needs downscaling on large images, 25 KB only for small or simple images.

For a photograph stored as PNG, targets below about 100 KB mean downscaling, and below 50 KB the honest answer is to change format. Settings move in discrete steps, so a result often lands well under the requested ceiling rather than exactly on it.

Savings by Image Type for Palette Reduction vs Lossless Only

Image TypePalette Reduction (Indexed Mode)Lossless Only (Compression Slider)
UI screenshot70 85%5 15%
Logo, icon or line art60 80%5 15%
Chart or diagram70 80%5 15%
Illustration with gradients40 65%5 15%
Photograph stored as PNG40 70%0 5%
Already optimised PNG0%0%