question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No quality for png (oxipng)?

See original GitHub issue

I am testing this library to replace imagemin, however I cannot find a quality setting for oxipng and level does not seem to effect the image size. In the issues I found that oxipng replaced optipng which may have had a quality setting?

What would be the way to actually compress a PNG?

I did some testing with quant’s numColors and this works:

   const preprocessOptions = {
                quant: {
                    // numColors: 128
                }
            };
            await image.preprocess(preprocessOptions);

but I am not sure if this is the prefered method to make PNG significantly smaller and wether other png libraries do the same thing (as in lowering the amount of colors) when they apply a lower quality.

I can imagine that an image with tons of colors would need a different numColors setting to still look okay, so it would be great if there is a quality setting that takes this into account.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:16

github_iconTop GitHub Comments

1reaction
jakearchibaldcommented, Aug 16, 2021

Here’s a version from Squoosh that’s only 80kb:

129618765-0d42f1f6-bbc4-41ab-a855-40061d989ca6 (1)

1reaction
jakearchibaldcommented, Aug 16, 2021

Yep, this looks like palette reduction to me, which Squoosh can already do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Here's a Tool to Cut Your PNG File Size Massively ... - Reddit
Here's a Tool to Cut Your PNG File Size Massively With No Quality Loss ... select the option Optimize PNG Textures With OptiPNG...
Read more >
Optimizing PNGs in GitHub Actions using Oxipng
I want them to be as high quality as possible (I even take them using --retina mode), but that didn't mean I couldn't...
Read more >
til/shrinking-pngs-with-pngquant-and-oxipng.md at main
Shrinking PNG files with pngquant and oxipng. I usually use Squoosh.app to reduce the size of my PNGs, but in this case I...
Read more >
Oxipng Alternatives: 25+ Image Optimizers and File ...
The best Oxipng alternatives are Caesium Image Compressor, ImageOptim and FileOptimizer. Our crowd-sourced lists contains more than 50 apps ...
Read more >
1966385 – Review Request: rust-oxipng - Oxipng is a multithreaded ...
QA Contact: Fedora Extras Quality Assurance ... Description: Oxipng is a multithreaded lossless PNG compression optimizer. It can be used via a command-line ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found