-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Audit: icon size coverage #291
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
Comments
Noooooo, I would argue that 192 is the only icon we need for honescreen I would not recommend requiring all the other icons at all as it is a |
@addyosmani @jakearchibald based on the above i see no reason to recommend devs do any icons but 192 and 512. 192 should be straight up logo. |
I'd say just 512 if it scales down nicely. Less for the user to download too. |
(Unless the larger icon is not just a scaling) |
512 doesn't fit in to 48 dp scaling properly for homescreen. you would |
Why does it have to be a multiple? FWIW I'm using single icons on my projects and it appears to work fine. |
Won't it be fuzzy if the multiples are out? |
It can be fuzzy without that. A sharp line can become two blury lines at |
TL; DR Regarding scaling down, if the image requires a specific scaling algorithm (eg. it's angular on purpose, such as pixel art) AND you want a perfect result, you should create and declare all icons. Else, declaring a single, large icon is fine. As @jakearchibald, @PaulKinlan and @paullewis discussed it above, scaling down can be an issue. I already investigated this issue for iOS because RealFaviconGenerator is in the process of generating only one, 180x180 icon. Since iOS icons are numerous and supposed to be declared right in the page, RFG policy of creating them all is often criticized, with good reasons. But I was concerned by how iOS scales down, wondering if it would produce decent results. So I made some tests and the outcome is: iOS scales down well. What about Android Chrome? I've just run the same kind of tests and the results are identical: Android Chrome scales icons down correctly. Note that this comment says nothing about using one (512) or two (192 and 512) icons. It is just about scaling down. |
Given this discussion, why does LH have the "manifest has icons greater than or equal to 144px" audit? Seems like the "... 192px" audit would be sufficient. Is there plans to add a "... 512px" audit? |
Already done |
Thanks for your insights into this, I have been trying to figure out how to use an icon just for the homescreen and another large just for the splash and I really think something is wrong with the auto-generation of splash screens. |
I confirm, that I also had to remove the 192x192 part from manifest leaving only 512x512 to get a large splashscreen. |
Thanks Hendrik and Pedro. We'll look into it. |
As of today, RealFaviconGenerator creates both 192x192 and 512x512 icons. On a Samsung Galaxy S7, Chrome is using the 192x192 for home screen and the 512x512 for splash screen (full results). For a quick check, you can run the compatibility test. |
@paulirish Is there a separate issue for this which we can subscribe to? |
I mean, they're used on the splash screen, but they're still icons no? Per GoogleChrome/lighthouse#291 (comment)
I mean, they're used on the splash screen, but they're still icons no? Per GoogleChrome/lighthouse#291 (comment)
I mean, they're used on the splash screen, but they're still icons no? Per GoogleChrome/lighthouse#291 (comment)
[skip ci] # [2.1.0](v2.0.4...v2.1.0) (2019-03-10) ### Features * Add PWA splash screen icons. ([2ee286c](2ee286c)), closes [/github.com/GoogleChrome/lighthouse/issues/291#issue-153328672](https://github.com//github.com/GoogleChrome/lighthouse/issues/291/issues/issue-153328672) * **travis:** `android-icons` -> `[@randy](https://github.com/randy).tarampi/android-icons` ([2e5eaa0](2e5eaa0))
[skip ci] # [2.1.0](v2.0.4...v2.1.0) (2019-03-10) ### Features * Add PWA splash screen icons. ([2ee286c](2ee286c)), closes [/github.com/GoogleChrome/lighthouse/issues/291#issue-153328672](https://github.com//github.com/GoogleChrome/lighthouse/issues/291/issues/issue-153328672) * **travis:** `android-icons` -> `[@randy](https://github.com/randy).tarampi/android-icons` ([52db43a](52db43a))
[skip ci] # [2.1.0](v2.0.4...v2.1.0) (2019-03-10) ### Features * Add PWA splash screen icons. ([2ee286c](2ee286c)), closes [/github.com/GoogleChrome/lighthouse/issues/291#issue-153328672](https://github.com//github.com/GoogleChrome/lighthouse/issues/291/issues/issue-153328672) * **travis:** `android-icons` -> `[@randy](https://github.com/randy).tarampi/android-icons` ([52db43a](52db43a))
I'm attempting the same as you, and I had it working with providing only 192x192 and 512x512. But yesterday I did some updates, added 384x384 and 1024x1024 based of some other examples, and now it uses the 192x192 at splash. I've been scratching my head about this earlier also. I believe at one point, I gave up on the big splash icon, but suddenly it replaced the small with the big icon after a long time use. I will remove the 384 and 1024 icons today anyway and try again, hopefully it will go back like it was. Strangely inconsistent in my experience. EDIT: Just noticed that the url to my 512 and 1024 was the same as the url to the 384 in my manifest.json (lazy copy/paste). Changed that and now it uses either 384 or 512 as splash, i think 384. It seems smaller than the one i had before i added 384 to the mix. |
I mean, they're used on the splash screen, but they're still icons no? Per GoogleChrome/lighthouse#291 (comment)
* fixed resizeMode in splash screen * Update icons.js * [WIP] updating image speed * Update icons.js * Removed default apple tags in favor of generated PWA tags * Fixed splashscreens not being generated * Removed iOS from web splash screen * webSplash.supportsTablet * Update Config.js * Removed extra icons: GoogleChrome/lighthouse#291
This is actually complete, and the splash screen issue sounds like a crbug. We do have more recommendation work tracked in #6700 (comment) |
* fixed resizeMode in splash screen * Update icons.js * [WIP] updating image speed * Update icons.js * Removed default apple tags in favor of generated PWA tags * Fixed splashscreens not being generated * Removed iOS from web splash screen * webSplash.supportsTablet * Update Config.js * Removed extra icons: GoogleChrome/lighthouse#291
Homescreen icon requirement
in
//src/chrome/android/java/res/values/dimens.xml
and app_banner_data_fetcher.ccSplash screen requirement
TLDR: There are 2 layouts for splash screens. You get the "small icon layout" if the icon you provide is <= 80dp. You get the "large icon layout" if it's over >80 dp. Ideal size for splash screen is 128dp. (There is also a way that a non-provided icon is used, though it's unclear what that is.)
see how the splash layout and icon is chosen in
//src/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
So far, our magic numbers are
48dp
and128dp
...dp and px
For phone-sized android devices, we mostly care about

hdpi
and up. (The Android One ishdpi
) You can ignore anything less thanhdpi
For example, the nexus 5 and nexus 6p are

xxhdpi
andxxxdpi
respectively. (four-x doesn't exist yet, phew!)So what do we need?
I dumped our key dp numbers into http://androidpixels.net/ (and hacked the page with devtools) for this 💰💰💰 screenshot:
So.. tl;dr:
If you'd like to provide native rendering of icon for home-screen and splash-screen across supported screen densities, you should provide an icon in these sizes:
72, 96, 144, 192, 256, 384, 512
And all of these should be explicitly indicated in your manifest.
Update: conversation below indicates you need fewer than this:
192, 512
Dec 2020 edit: some related stuff in #11762
The text was updated successfully, but these errors were encountered: