question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Audit: icon size coverage

See original GitHub issue

Homescreen icon requirement

in //src/chrome/android/java/res/values/dimens.xml and app_banner_data_fetcher.cc

 <dimen name="webapp_home_screen_icon_size">48dp</dimen>

Splash 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.)

// from chromium   /src/chrome/android/java/res/values/dimens.xml
<dimen name="webapp_splash_image_size_ideal">128dp</dimen>
<dimen name="webapp_splash_image_size_threshold">80dp</dimen>
<dimen name="webapp_splash_image_size_minimum">48dp</dimen>

There are three possible layouts for splash screens, which is chosen based on whether an icon was auto-generated by Chrome and whether the icon is bigger than a threshold.

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 and 128dp

dp and px

For phone-sized android devices, we mostly care about hdpi and up. (The Android One is hdpi) You can ignore anything less than hdpi image

For example, the nexus 5 and nexus 6p are xxhdpi and xxxdpi respectively. (four-x doesn’t exist yet, phew!) image

So what do we need?

I dumped our key dp numbers into http://androidpixels.net/ (and hacked the page with devtools) for this 💰💰💰 screenshot:

image

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 https://github.com/GoogleChrome/lighthouse/issues/11762

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

6reactions
akyotocommented, Apr 23, 2018

@paulirish Is there a separate issue for this which we can subscribe to? I’d love to stay up to date on the topic (512px splash screen not showing when 192px icon is provided). It seems to be an Android or Chrome for Android related problem.

2reactions
paulirishcommented, Mar 26, 2018

Thanks Hendrik and Pedro. We’ll look into it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is not configured for a custom splash screen
See Audit: icon size coverage for a discussion about the pros and cons of different approaches.
Read more >
Insurance audit icon | Illustrator Graphics - Creative Market
icon for insurance audit, insurance, audit, policy, checkmark, ... Compatible with: Adobe Illustrator; File Size: 721.17 KB; Vector; Layered.
Read more >
3 Ways Small Audit Teams Can Provide Global Coverage
Want to know how small audit teams can provide global coverage? Click here and we'll provide you with 3 ways you'll be able...
Read more >
2023 Social Media Image Sizes for All Networks [CHEATSHEET]
Cover photo: 1080 x 1920 pixels; Keep in mind that Reels are cropped to a 1:1 image in your profile feed and a...
Read more >
Financial Audit Manual | U.S. GAO
The Financial Audit Manual (FAM) presents a methodology for performing financial statement audits of federal entities in accordance with professional...
Read more >

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found