Site Icon Fallback
A lightweight fallback that serves your Site Icon from the site root, reducing 404s.
by Human Made · github.com/humanmade/site-icon-fallback · website
★ 0stars
2release downloads
0forks
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/humanmade/site-icon-fallback/releases/download/v0.1.5/site-icon-fallback.zipFrom the readme
Site Icon Fallback
Set a Site Icon in Settings → General. Get /apple-touch-icon.png, /favicon.ico and /favicon.png answered from it, instead of 404.
WordPress declares the Site Icon in the page head, but many clients never read that markup. Applebot, Safari's Favourites thumbnailer, Add to Home Screen, Reading List, and the link unfurlers in Slack and iMessage request icons straight from the domain root. This plugin answers them.
Nothing is hardcoded and no files are copied into your web root. Change the Site Icon and the root paths follow.
What it does
Declares the sized icon tags. Core emits one apple-touch-icon link with no sizes attribute, so a client after a specific size has no exact match to pick. This plugin considers 120, 152, 167 and 180, and declares each size backed by a genuinely different image. Works on any host with no configuration.
Answers the root paths. Requests for /apple-touch-icon.png, /favicon.ico and /favicon.png return the icon at the size asked for — a 200 with the image bytes, an ETag, and a day-long Cache-Control. It serves bytes rather than redirecting, because nothing guarantees an icon fetcher follows a redirect. This half needs those requests
Read the full README on GitHub →