You have a folder of PNGs and opening each one to hit Save is not your job. The real question is how do I compress a whole folder of PNGs without doing them one at a time? The answer depends on what you need the images to look like next to each other. When images appear together on the same page, consistency matters more than shaving the last byte off any single file. A uniform compression routine gives every image the same treatment, so no screenshot looks sharp while the next one shows banding.
The good news: you do not need to learn how to compress png files on each image individually. Pick one tool, one setting, and one order of operations. Apply it to every file in the folder. Keep the originals somewhere safe, never batch over the only copy. Palette reduction cannot be undone. Compress copies, not the masters.
Batch Compress PNG: the Routine That Works
To batch compress png files, you need a repeatable pipeline. The pipeline has three stages: strip metadata losslessly, reduce dimensions if the images are larger than they need to be, then apply palette reduction. Each stage is optional, but skipping the first two before the third wastes space and quality.
Strip Metadata First
Metadata chunks like tEXt, iTXt, eXIf, and iCCP colour profiles carry no visible information. Stripping them is lossless and costs nothing visually. On macOS, ImageOptim bundles several lossless optimisers and runs over a whole folder in one pass. On Windows, a command line tool like optipng or zopflipng does the same. GIMP's Export As dialog has checkboxes to omit background colour, gamma, layer offsets, resolution, creation time, and comments. Uncheck them all. The decoded pixels are identical after stripping, and the file is smaller.
Resize Before You Reduce Colours
File size scales with pixel count. Doubling the width quadruples the data. An image stored at 3000 pixels wide but displayed at 800 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. For high-density screens, serve about twice the display width. A blog image needs about 1600 pixels on the long edge. A full-screen hero image needs roughly 2560 pixels. On macOS, Preview has Tools > Adjust Size. On Windows, Paint has Resize on the Home tab or Ctrl+W. In Photoshop, Image Size in the Export As panel scales the export without altering the document. In GIMP, Image > Scale Image changes dimensions.
Apply Palette Reduction to the Whole Batch
Palette reduction rebuilds the image from an adaptive palette of typically 256, 128, or 64 colours. Two things happen. First, each pixel needs 7 or 8 bits instead of 24 or 32. Second, thousands of near-identical shades collapse into one entry, creating exactly the repetition that DEFLATE feeds on. The result: 70 to 85 per cent off a screenshot, 60 to 80 per cent off a logo, 70 to 80 per cent off a chart. A photograph stored as PNG can lose 40 to 70 per cent. Lossless-only savings for the same types are 5 to 15 per cent. Palette reduction is lossy, so you work on a copy. For batching, pngquant does palette reduction on the command line. Photoshop's Export As has a checkbox labelled Smaller File (8-bit) that switches to a 256-colour indexed palette. That is exactly palette reduction. Save for Web (Legacy) gives finer control: a Colors dropdown from 2 to 256, a Dither slider, and a live file size readout. In GIMP, go to Image > Mode > Indexed, choose Generate optimum palette, set the maximum number of colours, then export.
Bulk PNG Compression for Screenshots and Graphics
Bulk png compression means the same settings for every file. For screenshots and graphics, palette reduction is the single most effective step. Set the colour count to 256 as a starting point. Check the result. If banding appears in smooth gradients, raise the count. If the file is still too large, lower the count. A soft fade needs many closely spaced colours to look continuous. The visible failure mode is banding, and 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. A gentler setting fixes it.
Realistic targets: 500 KB is easy with no visible change on a screenshot or graphic. 200 KB is easy on most images. 100 KB is achievable and may need slight downscaling. 50 KB needs downscaling on large images. 25 KB is 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. JPEG discards high-frequency detail the eye is poor at noticing. A photograph as PNG is roughly ten times the size of the same photo as JPEG at a quality difference invisible at normal viewing distance. JPEG has no alpha channel, so converting a transparent PNG to JPEG flattens transparency onto a solid colour, usually white. Send print the untouched original. Print resolution is far higher than screen and exposes banding invisible on a monitor.
Never batch over the only copy. Palette reduction cannot be undone. 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. Keep the original somewhere you can find it.
The Right Tool for Each Platform
Every operating system and image editor has a correct route and a wrong one. Use the wrong tool and you get a file that is no smaller and a wasted afternoon. Use the right one and a folder of 50 PNGs takes a few minutes.
macOS
Preview has no PNG quality or compression slider. File > Export, choose PNG. That is it. The real saving in Preview is Tools > Adjust Size. Change dimensions before exporting. Preview can export to JPEG, where a Quality slider does appear. For palette reduction, you need an online tool, ImageOptim, or the command line. Finder Quick Actions and Automator can batch a Scale Images step over a folder. macOS has no built-in palette reduction.
Windows
Paint has no compression setting. Resize on the Home tab or Ctrl+W changes dimensions. File > Save as > PNG re-saves. Paint can Save as JPEG, which is the large saving available for photographs. The Photos app has Edit > Resize with preset and custom dimensions. On Windows 11 a quality slider appears for JPEG output, not for PNG. Behaviour is the same on Windows 10 and Windows 11. Windows has no built-in palette reduction either.
Photoshop
File > Export > Export As, choose PNG. The panel has a Smaller File (8-bit) checkbox which switches to a 256-colour indexed palette. That is palette reduction. Image Size in the same panel scales the export without altering the document. File > Export > Save for Web (Legacy) gives finer control: PNG-8 with a Colors dropdown, a Dither slider, and a live file size readout. Save for Web is where you can go below 256 colours in Photoshop. Saving with File > Save As PNG gives no size options at all.
GIMP
File > Export As, type a .png filename, and the PNG dialog appears. That dialog has a Compression level slider from 0 to 9. It is entirely lossless. Level 9 is slower and slightly smaller. It does not reduce colours. The dialog also has checkboxes to save or omit background colour, gamma, layer offsets, resolution, creation time, and comments. Unchecking these strips metadata. For real reduction: Image > Mode > Indexed, choose Generate optimum palette, set maximum number of colours, then export. Image > Scale Image changes dimensions. Export As is the correct route. File > Save writes GIMP's own .xcf.
When to Change Format Instead
Sometimes PNG is the wrong container for the content. A photograph as PNG is roughly ten times the size of the same photo as JPEG at a quality difference invisible at normal viewing distance. JPEG has no alpha channel at all. Converting a transparent PNG to JPEG flattens transparency onto a solid colour, usually white, so only do this if the image has no transparency. JPEG handles sharp edges badly, producing visible ringing around text and lines. On flat artwork, JPEG often produces a larger file than PNG. WebP supports a full alpha channel like PNG and is about 26 per cent smaller than PNG in lossless mode. WebP is supported by all current browsers. Some older desktop applications still cannot open it.
If you need to compress multiple png files that are photographs, change the format. The pipeline becomes: resize, then convert to JPEG or WebP. The quality slider on JPEG output in Preview, Paint, or the Photos app gives you control over the trade-off between file size and visible quality. Start at 85 per cent quality and lower it until you see artefacts. That is the smallest file that still looks acceptable.
Realistic File Size Targets for Bulk Compression
| Target Size | Screenshot or Graphic | Photograph as PNG | Method |
|---|---|---|---|
| 500 KB | Easy, no visible change | Easy, slight downscale may help | Strip metadata, palette to 256 |
| 200 KB | Easy on most images | Needs downscale or format change | Palette to 128, resize if large |
| 100 KB | Achievable, may need downscale | Needs downscale and format change | Palette to 64, resize to 1600px |
| 50 KB | Needs downscale on large images | Format change required | Palette to 32, resize to 800px |
| 25 KB | Small or simple images only | Not realistic as PNG | Palette to 16, resize to 400px |