27

Is there any way now to specify that an SVG icon in "manifest.json" for a PWA should be used for all possible sizes? (Chrome/chromium is my main target now. Firefox will hopefully follow.)

    "icons": [
        {
            "src": "path-to-icon.svg",
            "purpose": "maskable any",
            "sizes: "???"
        }
    ],
Leo
  • 4,136
  • 6
  • 48
  • 72

2 Answers2

32

"sizes": "any"

https://html.spec.whatwg.org/multipage/semantics.html#attr-link-sizes

NotWoods
  • 686
  • 4
  • 13
4

"sizes": "any" didn't work for me. I used the following configuration:

{
    "src": "logo.svg",
    "sizes": "48x48 72x72 96x96 128x128 256x256 512x512",
    "type": "image/svg+xml",
    "purpose": "any"
}
Alwin
  • 786
  • 9
  • 19
  • 3
    Per https://bugs.chromium.org/p/chromium/issues/detail?id=1107123#c10, there *was* a problem in Chrome where "sizes" didn't work, but it should be fixed now. – Josh Oct 03 '22 at 02:02