If you need to know how to compress a png on mac, start with what is actually in the box. Preview and the Photos app can change dimensions and format. They cannot reduce colours. That single gap is why a 5 MB screenshot stays 5 MB after Export in Preview, while the same image can land at 400 KB with palette reduction. This article walks the built in route honestly, then points to where macOS runs out and what fills the gap.
How MacOS Handles Your PNG
The operating system gives you two tools that understand a PNG file: Preview and the Photos app. Neither has a quality slider for PNG output, because PNG is a lossless format. Every pixel must stay exactly the same. The only levers macOS pulls are dimensions and format switching.
Preview: What the Export Dialog Actually Does
Open your image in Preview. Go to File > Export and choose PNG from the Format dropdown. You get a set of colour profile and alpha channel options. You do not get a compression slider. No quality percentage, no file size target, no colour reduction. The file that comes out is the same pixel for pixel as what went in, so if the input was 10 MB the output will be 10 MB. The only way Preview shrinks a PNG is by shrinking the image itself.
Tools > Adjust Size changes pixel dimensions. This is where the real saving lives when you stay inside macOS. An image made for a blog that stores at 3000 pixels wide and is displayed at 800 wastes roughly fourteen times the data anyone will see. Resize it down. For a typical article image aim at 1600 pixels on the long edge. For full screen work 2560 pixels covers it. Resize before you export. Compressing pixels you are about to discard is wasted work and the compressor runs better on the smaller image.
Preview can also export to JPEG. If the image is a photograph, this is the honest saving. A photo that is ten times larger as PNG than as JPEG at visually identical quality should not stay PNG. Switch format. The JPEG Export dialog gives you a Quality slider. Set it between 70 and 80 for a balance that most screens cannot distinguish from the original.
Photos App Export: Same Limit, Same Workaround
The Mac Photos app offers an export path that behaves identically to Preview. Select a photo, choose File > Export > Export 1 Photo, pick PNG from the format list. The dialog has no quality control. PNG is PNG. The output is lossless and the size is whatever the size is. Use the same strategy: scale the image before export inside the Photos app if the image needs to be smaller as a PNG. For a photograph, choose JPEG from the format dropdown and slide the quality control to a reasonable level. If your workflow demands a transparent PNG with no quality loss, Photos cannot give you a smaller file size. You leave macOS at that point.
How to Compress a PNG File on Mac: the Real Gap
Understanding how to compress a png file on mac means understanding where the built in tools stop. Preview and Photos handle dimensions and format. They do not touch the internal structure of the PNG. They cannot strip metadata. They cannot switch to a palette. They cannot run the stronger DEFLATE pass that a purpose built tool uses. PNG always compresses data through two stages: a filter that predicts each pixel from its neighbours, then a Deflate compression pass. Flat colour and sharp edges make the prediction accurate, and accurate predictions compress to almost nothing. Photographic sensor noise makes the prediction wrong nearly every time, producing random differences that are nearly incompressible. That is why a photo as PNG is huge and a screenshot of a dialog box can be tiny. The built in tools accept whatever the source gives them. They never reprocess the filter choice or the Deflate pass.
The lossless optimisation that tools like optipng and zopflipng do searches harder for the best filter per row and runs Deflate at maximum effort. Typical savings are 5 to 15 percent. Sometimes zero on an already optimised file. macOS does not ship a tool that does that. You need ImageOptim, which bundles these back ends, or the command line.
How to compress png file size on mac when lossless is not enough. The answer is palette reduction. A palette PNG stores a maximum of 256 colours. A standard screenshot stores 16.7 million. Cutting from 24 bits per pixel to 8 bits per pixel is a one third reduction before Deflate even starts, and the real effect is larger because thousands of near identical shades collapse into one entry, creating exactly the repetition Deflate feeds on. Savings measured on screenshots run 70 to 85 percent. On logos and icons 60 to 80 percent. On illustrations with gradients, 40 to 65 percent. Even a photograph stored as PNG can lose 40 to 70 percent when reduced to a palette, though banding in smooth gradients becomes visible below 128 colours. macOS has no tool that does palette reduction. You use pngquant from the command line, ImageOptim which offers a lossy mode, or an online service.
Where You Have to Leave MacOS for Palette Reduction
The honest limit of macOS is that you cannot reduce the colour palette from within the operating system. No menu, no checkbox, no hidden export setting gives you a PNG with 128 colours chosen from the colours actually present in the image. Preview and the Photos app always write a 24 bit or 32 bit PNG. If your file needs to drop from 5 MB to 400 KB with no visible change on a screen, you leave macOS and use a tool designed for the job.
The most common options are pngquant on the command line, ImageOptim which bundles a lossy mode alongside the lossless optimisers, or an online tool such as the one this site provides. Each of them builds an adaptive palette of colours actually present in the image, then remaps every pixel to the closest palette entry. The effect compounds: each pixel uses fewer bits, and thousands of nearly identical shades become a single colour that repeats across the image. That repetition is what Deflate exploits.
Two failure modes matter. The first is banding in smooth gradients. A soft fade from blue to white needs many closely spaced colours to look continuous. Below about 128 colours the bands become visible on the screen. The second is a stair step fringe on semi transparent edges. The soft alpha band around a rounded logo snaps into discrete steps if there are not enough palette entries. A gentler setting with more colours avoids it. Keep the original. Palette reduction cannot be undone, and compressing an already reduced palette again gives a worse result than doing it once from the full colour original.
What Each Tool Actually Does to Your PNG
| Tool | Can resize | Can switch format | Has a quality or compression slider for PNG | Does palette reduction | Strips metadata |
|---|---|---|---|---|---|
| Preview | Yes | Yes | No | No | No |
| Photos | Yes | Yes | No | No | No |
| Photoshop (Export As) | Yes | Yes | Checkbox for PNG-8 | Yes | Yes |
| GIMP (Export As) | Yes | Yes | Compression level (lossless) | No in export; yes via Image > Mode > Indexed | Checkboxes |
| pngquant / ImageOptim | No (separate step) | No | Number of colours | Yes | Yes |
Build a Workflow That Srinks Your File for Real
The cheapest order for any PNG is: strip metadata losslessly, then reduce the palette in steps, then reduce dimensions, then change format. Metadata stripping is free. Palette reduction is the single largest gain on screenshots and graphics. Resizing helps on every image. Format switching helps on photographs. Do them in that order and you know where the limit is before you commit to a step that loses data.
Target sizes are not arbitrary. For a screenshot or UI graphic, 500 KB is easy with no visible change. 200 KB is easy on most images. 100 KB is achievable with slight downscaling on large images. 50 KB needs downscaling on anything above a thumbnail. 25 KB is for small or simple images only. For a photograph stored as PNG, targets below 100 KB mean downscaling, and below 50 KB the honest answer is to change format to JPEG. Settings move in discrete steps, so a result often lands well under the requested ceiling rather than exactly on it.