Manifest icons are fetched. Unreachable or non-image files are dropped.
Purpose tokens come from the space-separated purpose member. If purpose is omitted, it is treated as any (the specification default).
Icons are grouped into:
anymaskablemonochrome
An icon with purpose: "any maskable" appears in both lists.
Primary icon
Selected from the any list when it is non-empty, otherwise from all valid icons.
Ranking, in order:
- MIME type: PNG, then SVG, then WebP, then other.
- Square preferred over non-square.
- Size closest to 512px (measured shortest side, else declared
sizes). SVG is treated as 512 for this comparison. - Larger size as a tie-break.
Consumers that need an adaptive launcher icon should prefer icons.maskable[0] and fall back to icons.primary.