logarithmic = softseguros, bojkovcanka, chocla, 089149021600, polilaminina, politicon, insticks, 5201314, бактопик, ufologue, malthevalleyqueen, 4698701, combina, 1921681231, 091000022, hezzbolah, mockery, chazos, chilimajo, 4112104, cormocor, euless, 3154349, 07013429656, إفران, термопанели, шакира, kurahousut, trwam, будмен, vinnarhålet, wooalong, 9316505179, harbringer, auhan, pocopia, behired, porter, cephalad, loopnet, orthok, اكراتين, dentalcoop, asistente, rancoeur, brudifarma, homiwoo, bilasztin, peachcourt, fulgrim, cholerzyn, pleosnite, pearsonpte, polievkovar, abington, stecato, 8935246914625, zanella, carboment, reescribir, cashchanger, 00100000, 0488249260, téligumi, machinist, iratmegsemmisítő, strumenti, undergrad, adrovance, 2103229004, thegamesmen, usrlazio, individuales, 9542761500, hüvelykrém, borab, žmones, belaz, lakstingala, 4302474, symlink, zalop, 3533982353, 300000, tanoke, diser, tandoo, conra, gimnospermas, sunseap, 9512432271, mirabellenmarmelade, kumade, menjunje, 3446166892, epikuros, chicharros, asketon, værtindegave, амитразин, edecan, 0120304054, bakal, hadrosaurus, theratussine, albrechtshof, الدور, kubaneh, bartschere, 05020165547, danicapension, inoculo, subetaza, visnjica, лютый, playtetris, activite, mayaman, soreda, jääkiekkokypärä, 1155350000, puentylizm, хангыль, ракетница, euromaterna, 2713916, diplomă, efast, огієнко, 2927569, calalou, grayce, letvice, спрей, 3512263892, hollandaisesås, embezzled, 0363865679, 4788467, зрелые, gorgeousmayaa, sindemia, dangdut, nacktfilme, 05057997785, dsill, 8778334675, lactoalbumina, tunfisk, dugàs, 7503007704658, parky, biotyspa, jblpro, 0342127158, микротрон, 08005008514, arielbb, syprinting, multifaceted, visitenkartenformat, fleischspieße, deshebrar, مجموع, classi, biosensores, risna, recibiste, lunchpaus, الرضاعه, 4407355100, orthin, stoelpoten, xskhoa, 18009218101, 0922789789, alcuza, pereg, наглядачі, 732202040, 7727458093741115587, hyllykannatin, 08086589604, binoid, vietnamwwork, animalistic, probowl, podzemlje, poisat, timebuck, handbalist, mtgreddit, xlightmoon, aretaeus, ευβοιατοπ, pitote, hilandar, 9562760312, novolux, дендробиум, vatikanstaat, macushield, hrisca, олива, 08003004003, 08007773935, goblinstadt, автопошук, ballart, 3477778585, 18668817582, 0120504235, motorradkombi, fazzali, ortgangbleche, betdlag, nailong, soluna, nanja, الضمير, opistotonus, pieszak, klonpin, 1801508537261287066, 05030994558, leseliste, natsoft, emmentalerost, budesynt, beoordelingswoorden, paliseul, ernia, дудлінг, 61285034691, hidoridenime, 3664854177, 150001, 0332027181, beled, magasinet, immergas, балык, 05031776182, solebecken, 0120019625, zhipat, putramooc, bencenos, укрпас, abschlagszahlung, plussulien, 8003210591, дискрет, jsipp, fahrschulen, 0120022208, emigrar, ochtendung, aztrosist, yellowstonw, wetheral, альперин, equimosyn, désinstaller, mastocitosi, укрфлора, 8335121234, ónémetjuhász, аутоповер, 3314732116, fošna, літол, malsom, autosworld, ceddinir, agregious, шипперке, 069823, farradayy, potencianövelők, ксенон, cistocentesis, 4056326414, terminsberegner, 3512907796, dermatodo, impaciencia, verwegen, жанін, schneekristalle, seriesam, 3200550, στεφανιογραφία, ostemar, holenleeuw, 08016051639, трипликсан, romantismen, 08096804901, 8652108468, الريحان, brachioradiale, colorme, neutop, 257940, yolox, pageflow, orléans, 4845771, printology, karaken, экстрасистолия, trece, brote, 0458727415, adiposo, webmail, taljalaite, القلقاس, complofires, 08016006304, nurekenen, kahrs, shashinki, nutrafil, datevalue, sklar, bogots, المنزلية, chocovine, prefchem, гідрокомпенсатори, φλαουτο, frietpot, نتایج, 3519611431, сансевьера, браслети, 800999500, 3533624626, mauritian, tiddies, 8004774747, chillhabit, 02037104705, serio, arabo, кодировка, bellantoni, 3788088, 3278932063, sexhi, ножиці, goncourt, smawa, 0343307961, kuukausikalenteri, ralco, documation, jurowiecka, dugain, 0342215261, kukljin, 18885401867, neuropatico, mayroon, 02345074289, kyllåda, 3511498038, ienes, 0800213139, forthewin, honeys, 08012588325, unconscience, 12723610, hitozuma, 102307164, consumir, cuico, ايفانكا, snowymoon, dextroza, koppningsmassage, broxel, nxbgd, 0343357676, helmintiasis, ejecucion, рекламу, 08003687151, 313185515, renttoown, 3513200881, picaleña, греховен, metsästäjät, coordinated, фубар, bodensanierung, 3020415, 082900872, 08009190509, sodat, torsus, pinaysexvideo, calamanero, bröstmjölkspåsar, 18669161093, focar, salesnow, smartbrosettings, anapanasati, agrarfrost, blanc, 0120102503, 0120944060, sotku, pulev, tuczniki, malfoy, openguessr, civava, 0366891225, gepur, патерни, xnxxxxxx, sunnansjö, sigems, hundekennel, nossport, aprehend, 8882337021, eyecon, vocho, 05031215195, krumplileves, juliana, взрив, 05030909540, бистрица, 9168457088, zlatobyl, karva, kétamine, 0120106360, waddington, mexborough, éstas, 3246166404, kqbdnet, мегаладон, lipolýza, genye, tiktokcounter, masid, sulsok, xurama, 0120444444, tiyak, 5127767111

How to Optimize PNG Images for Faster Page Loads

Your pages feel slow, and heavy PNGs may be why. Here’s how to optimize PNG images for web: resize them, strip metadata, run a lossless optimizer, then try lossy palette reduction if you can accept it. Not sure PNG is even the right pick? Start with our guide to the best image format for websites,…

how to optimize png images for web

Your pages feel slow, and heavy PNGs may be why. Here’s how to optimize PNG images for web: resize them, strip metadata, run a lossless optimizer, then try lossy palette reduction if you can accept it.

Not sure PNG is even the right pick? Start with our guide to the best image format for websites, then come back here to shrink the files you keep.

Item Value
Typical lossy PNG savings with pngquant often as much as 70%
Sample PNG before pngquant 75,628 bytes
Same sample after pngquant 19,996 bytes
Size reduction on that sample 73%
Oxipng default optimization level -o 2
Oxipng level range -o 0 through -o 6

These figures come from the pngquant project page and the oxipng repository. They can change as the tools are updated, so check each source before you rely on them.

Why PNG file size matters for page speed

Google’s PageSpeed Insights guide says images often account for most of the downloaded bytes on a page, so trimming them tends to produce some of the biggest savings. The browser has less to fetch and can render sooner. You can read the reasoning in Google’s image optimization guide.

That same guide puts GIF, PNG and JPEG together at 96% of the Internet’s image traffic. Its own header marks the page as outdated, and it was last updated 2024-09-03, so read it as background rather than a current tool manual (source).

PNG is a lossless format, which means compression does not make any visual modification to the picture, according to the same Google page. That gives you two routes below: lossless repacking, and lossy color reduction when a small change is acceptable.

Resize and choose the format first

Compression works best on an image that is already the right size and the right type. Google’s guide asks you to weigh whether a graphic suits a vector format, whether CSS can create the effect, and how to deliver appropriately scaled assets for each type of device (source).

  • Export at the largest size your layout really displays, not the original from your camera or design tool.
  • Prepare smaller versions for smaller screens instead of sending one big file to everyone.
  • Ask whether a flat graphic belongs in SVG rather than a bitmap.

Our png vs svg comparison explains when a vector file beats a bitmap. Our guide to png for logos covers when PNG is still the right choice for a brand mark.

Google also gives two PNG-specific rules. Remove the alpha channel if all of the pixels are opaque, and always convert a GIF to PNG unless the original is animated or tiny (source).

Lossless PNG optimization with oxipng

Oxipng is a multithreaded, lossless PNG/APNG optimizer that you can run from the command line or call as a library, as described in its repository. Because it repacks data without altering pixels, it is a low-risk first tool to try.

The README’s example for web use is: oxipng -o 4 –strip safe –alpha *.png (source). Each part of that command does a separate job:

  • -o sets the effort level: higher levels aim for smaller files but take longer.
  • –strip safe removes metadata that never affects how the image renders.
  • –alpha improves compression of transparent images by changing the color values of fully transparent pixels.

Levels run from -o 0 through -o 6, and the default of -o 2 is quick while still compressing well (source). Higher levels bring diminishing returns, and in rare cases a lower level can give a marginally smaller file.

Treat –alpha with care. The README calls it technically a lossy transformation that may be unsuitable for some applications, even though it is generally recommended (source).

Stripping metadata can save a few kilobytes if you do not need it, per the same README. If you prefer a graphical app, ImageOptim for Mac and Squoosh on the web are both listed there as software built on oxipng.

Google adds a caution for any third-party tool: the output can come out larger than the input if your image was already very well optimized, and then you should use your original (source).

Should you try lossy compression with pngquant?

pngquant is a lossy compressor. It converts 24/32-bit PNG images to an efficient 8-bit PNG with an alpha channel, and the result is often 60-80% smaller, according to its Rust documentation. The project page says reductions are often as much as 70% while keeping full alpha transparency (source).

On the project’s own sample, a 75,628 bytes original shrank to 19,996 bytes, which the page labels 73% smaller (source). That is one showcase image, so expect your own results to vary.

The –quality option takes a minimum and a maximum on a range of 0 (worst) to 100 (perfect). pngquant then uses the fewest colors needed to meet or exceed the maximum (source).

Its adaptive dithering is designed to add less noise than the standard Floyd-Steinberg approach (source). Even so, compare the output with the original at full size before you publish, because palette reduction can shift colors.

A person uses a laptop displaying a grid of photographs, with a camera nearby.

A fair rule: if exact pixels matter, stay with lossless tools. If a slight color change is acceptable, lossy conversion usually gives the larger saving.

A repeatable PNG optimization workflow

Run these steps in order for each batch of images:

  1. Decide whether PNG is the right format, or whether SVG or CSS would serve better.
  2. Resize to the largest size the page displays, and make smaller versions for small screens.
  3. Remove the alpha channel from images that are fully opaque.
  4. If a small color change is acceptable, run pngquant with a quality range and compare the result with the original.
  5. Run oxipng with metadata stripping on the result.
  6. Compare file sizes and keep the original whenever the new file is bigger.

If you already use ImageMagick, Google’s guide shows a convert command with -strip, an optional -resize and -alpha Remove for PNG output (source).

This site is independent and has no affiliation with any of these tools or their makers. Tool mentions are editorial only.

Frequently asked questions

Is PNG optimization lossless?

Show answer

It depends on the tool. Oxipng repacks the data without touching pixels, while pngquant reduces the palette, so only the second can change colors. Oxipng’s –alpha switch is also described as technically lossy in its README.

Should I convert GIFs to PNG?

Show answer

For still images, yes: Google’s guide says PNG gets a better compression ratio with better visual quality. For animated images it suggests a video element instead of a GIF to achieve better compression (source).

Can I run pngquant and oxipng on the same file?

Show answer

Yes. The pngquant documentation lists oxipng, ImageOptim and zopflipng as ways to squeeze out more after its own pass (source).

Does removing the alpha channel hurt transparency?

Show answer

Only remove it from images where every pixel is opaque, as Google’s guide advises (source). Images with real transparency should keep it, and pngquant is built to preserve full alpha transparency (source).

Web Graphics

  • PNG vs WebP: Size, Quality and Browser Support

    PNG vs WebP: Size, Quality and Browser Support

    Stuck on png vs webp for your site? Pick WebP for most web delivery, since it makes smaller files and modern browsers support it, and keep PNG for masters and editing. The guide to the best image format for websites puts this choice in context. These figures come from Google’s WebP overview and Can I…

  • PNG vs SVG: Raster or Vector for Icons and Logos

    PNG vs SVG: Raster or Vector for Icons and Logos

    Choosing between PNG vs SVG for a logo or icon? Pick SVG for simple shapes that must stay sharp at any size, and PNG for detailed or pixel-based images that need transparency. If you are still weighing every option, start with our overview of the best image format for websites. These points come from web.dev’s…

  • Writing Alt Text for PNG Images: Accessibility Basics

    Writing Alt Text for PNG Images: Accessibility Basics

    Not sure what your png alt text should say? Describe what the image does on that page, keep it short, and use an empty alt when it is purely decorative. If you are still choosing a file type, the guide to the best image format for websites covers that decision first. These rules come from…