Prefer svg icon instead favicon if possible (#53343)
### What? Change the `favicon.ico` metadata `sizes` property from always `"any"` to using the actual size possible ### Why? When chrome/firefox browsers search for icon it needs the proper metadata to determine which one to use, giving `favicon.ico` sizes with `"any"` will prevent it loading the `icon.svg` as default icon when available. Changing to set proper size of `favicon.ico` (as the `favicon.ico` sizes could be 16x16, 32x32, etc.) fixes the issue. It works (loading svg icon) for chrome and firefox: Firefox <img width="505" alt="image" src="https://github.com/vercel/next.js/assets/4800338/6873e595-479d-4d9e-ae5c-39e5f938fcf5"> Chrome <img width="460" alt="image" src="https://github.com/vercel/next.js/assets/4800338/03bbe4c7-ef76-4f34-a611-337b0d4b97a3"> It loads favicon.ico for Safari: Using the `test/e2e/app-dir/metadata` app it shows the favicon.ico for Safari <img width="1000" alt="image" src="https://github.com/vercel/next.js/assets/4800338/92cc8714-ea5e-432d-8144-2a4a42ee4ce2"> Can't have it as an e2e test as I tested it always loads the `favicon.ico` in headless mode which can't determine the behaviors Fixes #52002 Co-authored-by:JJ Kasper <jj@jjsweb.site>
Showing
Please
register
or
sign in
to comment