Creatiwity / gatsby-plugin-favicon

UNMAINTAINED - Favicon Gatsby plugin
MIT License
166 stars 27 forks source link

Compress generated PNGs #58

Open ezekielaquino opened 5 years ago

ezekielaquino commented 5 years ago

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

YoshiWalsh commented 5 years ago

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.

julien1619 commented 5 years ago

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.

mikepuglisi commented 5 years ago

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