gatsby-plugin-favicon icon indicating copy to clipboard operation
gatsby-plugin-favicon copied to clipboard

Compress generated PNGs

Open ezekielaquino opened this issue 5 years ago • 3 comments

The generated PNG output is not using a compression e.g. TinyPNG, would be cool if it would do so automagically!

ezekielaquino avatar Feb 01 '19 17:02 ezekielaquino

FYI TinyPNG uses the open-source library pngquant under-the-hood.

gatsby-plugin-favicon is just a wrapper around favicons-webpack-plugin, and favicons-webpack-plugin is just a wrapper around itgalaxy/favicons. So in order for compression to be implemented I think itgalaxy/favicons would have to add it.

But itgalaxy/favicons don't want to add any native dependencies so this seems unlikely to ever happen.

I'd love this though, especially if the generated ICO file also contained the compressed PNG images.

YoshiWalsh avatar May 25 '19 07:05 YoshiWalsh

I'm planning to move away from favicons-webpack-plugin because it seems to be unmaintained. I'll switch to sharp and you will likely be able to compress generated PNGs.

julien1619 avatar May 25 '19 17:05 julien1619

I just ran into this issue. I recently started using Jimp which handles image processing "with zero native dependencies." Something to consider over sharp.

mikepuglisi avatar Aug 23 '19 16:08 mikepuglisi