Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVG icon in PWA manifest.json - how to set it for all sizes?

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: "???"
        }
    ],
like image 407
Leo Avatar asked Jul 10 '20 00:07

Leo


People also ask

What is PWA manifest JSON?

The web app manifest is a JSON file that tells the browser about your Progressive Web App and how it should behave when installed on the user's desktop or mobile device.

What should be included in manifest JSON?

Using manifest. json , you specify basic metadata about your extension such as the name and version, and can also specify aspects of your extension's functionality (such as background scripts, content scripts, and browser actions).

What are the basic attributes to be present in manifest JSON to make the app installable?

The manifest can include basic information such as the app's name, icon, and theme color; advanced preferences, such as desired orientation and app shortcuts; and catalog metadata, such as screenshots. A web app manifest is a required installability criteria in every browser.

What is manifest icon?

One or more icons that represent the extension, app, or theme.


1 Answers

"sizes": "any"

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

like image 97
NotWoods Avatar answered Sep 20 '22 19:09

NotWoods