Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🍱 Reduce size of favicons #983

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

sorairolake
Copy link
Contributor

@sorairolake sorairolake commented Dec 28, 2024

This executes the following commands:

convert ./static/favicon.ico[0] ./static/0.png
convert ./static/favicon.ico[1] ./static/1.png
convert ./static/favicon.ico[2] ./static/2.png
oxipng -o max ./static/*.png
fd . -e png ./static/ | parallel "zopflipng -my {} {}"
icotool -c -o ./static/favicon.ico ./static/0.png ./static/1.png ./static/2.png

The command versions are as follows:

  • oxipng: 9.1.3
  • zopflipng: 1.0.3
  • icotool: 0.32.3

The regenerated files are losslessly compressed from the original files. Although oxipng -Z can also use Zopfli, I used zopflipng because it gives better results. Also, when I ran icotool -l ./static/favicon.ico, I got the following result, so I regenerated favicon.ico.

--icon --index=1 --width=16 --height=16 --bit-depth=32 --palette-size=0
./static/favicon.ico: incorrect total size of bitmap (4392 specified; 4264 real)

Copy link

netlify bot commented Dec 28, 2024

Deploy Preview for hugo-congo ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ee5b74d
🔍 Latest deploy log https://app.netlify.com/sites/hugo-congo/deploys/676fd5b182673000083c526d
😎 Deploy Preview https://deploy-preview-983--hugo-congo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant