Web App Manifest Icons: SVG sizes any, 192, 512, Maskable

Does an SVG icon with sizes "any" make a PWA installable? What Chrome checks, why you still ship 192 and 512 PNGs, maskable entries and how src paths resolve.

Amit Yadav
8 min read
On this page

The icons array in a web app manifest decides whether Chrome offers to install your app and what the icon looks like on the home screen, the app launcher and the splash screen. This page answers the questions developers actually search for: does an SVG with sizes: "any" count, which PNG sizes you still need, how maskable works, and how src paths resolve.

Quick answer

  • SVG with sizes any: Chromium's install check accepts a square PNG, SVG or WebP icon of at least 144px, or with sizes any, whose purpose includes any. So an SVG entry can pass the check on its own.
  • Still ship 192x192 and 512x512 PNGs. web.dev's install criteria list both, and Android launchers and splash screens use raster sizes. Keep the SVG as an extra entry, not the only one.
  • Maskable is a separate entry with purpose maskable and the logo inside the central safe zone (a circle with a radius of 40% of the icon width). Do not combine any and maskable in one entry.
  • Relative src paths resolve against the manifest URL, not the page URL.
  • Chrome error 'Manifest does not contain a suitable icon' means no square icon of 144px or more with sizes set and a valid purpose. Add the 512x512 PNG entry below.

Copy-paste icons array

This is the set we recommend. It passes Chrome's check, gives Android a raster icon at both sizes, adds a scalable SVG for browsers that use it, and keeps the maskable version separate:

{
  "name": "Your App",
  "short_name": "App",
  "start_url": "/",
  "display": "standalone",
  "background_color": "#ffffff",
  "theme_color": "#0f172a",
  "icons": [
    { "src": "/icon-192.png", "sizes": "192x192", "type": "image/png" },
    { "src": "/icon-512.png", "sizes": "512x512", "type": "image/png" },
    { "src": "/icon.svg", "sizes": "any", "type": "image/svg+xml" },
    { "src": "/icon-maskable-512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" }
  ]
}

Link it from every page's <head>:

<link rel="manifest" href="/manifest.webmanifest">

The file name does not matter to browsers. manifest.webmanifest, site.webmanifest and manifest.json all work, and so do icon names like pwa-192x192.png (the name the Vite PWA assets generator uses) or android-chrome-192x192.png. Only the src, sizes, type and purpose values count.

Generate the PNGs from one image

The Favicon Generator exports favicon-192x192.png, favicon-512x512.png and a site.webmanifest from one source image. Its manifest marks both PNGs "any maskable". If your logo touches the edges, split that into the separate entries shown above.

Does an SVG with sizes any count?

Three primary sources, three slightly different answers:

SourceWhat it says
MDN, manifest iconsFor raster formats, list the exact sizes. "For vector formats like SVG, you can use any to indicate scalability." Its example uses an SVG with "sizes": "any" for large icons.
web.dev, install criteria"icons - must include a 192px and a 512px icon". It does not mention SVG.
Chromium source, installable_evaluator.ccLooks for a supported icon with purpose any, "with size >= kMinimumPrimaryIconSizeInPx (or size "any"), and is square". The minimum is 144px, and PNG, SVG and WebP are the accepted formats.

So in current Chromium code, one square SVG with "sizes": "any" meets the install check by itself. We still add the two PNGs because web.dev's published criteria ask for them, and because we could not find documentation that every Android launcher and splash screen renders an SVG source cleanly. That part is unconfirmed, so treat the PNGs as the safe default.

Safari is a separate case. For the iOS home screen, keep an apple-touch-icon (180x180 PNG) in your HTML. The favicon sizes guide has the full head tag set.

Chrome error messages and fixes

These strings come from Chromium's installable_logging.cc. You see them in DevTools, Application panel, Manifest section.

Error textCauseFix
Manifest does not contain a suitable icon - PNG, SVG or WebP format of at least 144px is required, the sizes attribute must be set, and the purpose attribute, if set, must include "any" or "maskable"No entry meets the size, format or purpose ruleAdd the 512x512 PNG entry with "sizes": "512x512" and no purpose, or with purpose set to any
No supplied icon is at least 144px square in PNG, SVG or WebP formatThe file is smaller than declared, or not squareExport a real square image. A 600x512 file declared as 512x512 fails
Could not download a required icon from the manifestThe src URL returns 404 or is blockedOpen the resolved URL in a tab. Check the path rule below
Downloaded icon was empty or corruptedThe server returned HTML or a broken fileCheck the response Content-Type and file bytes

Some audit and packaging tools word it as "need at least one PNG or SVG icon 512x512 or larger". We could not trace that exact string to Chrome's source, so it likely comes from another tool. The same fix works: a 512x512 PNG entry with sizes set.

purpose: any vs maskable

purpose tells the system how it may use the icon. Per MDN, the values are:

  • any (the default when you leave purpose out): shown as is.
  • maskable: designed so the system can crop it into a circle, squircle or other shape.
  • monochrome: the system uses only the alpha channel as a mask over a solid fill.

For a maskable icon, web.dev says the important content must sit inside a circle with "a radius equal to 40% of the icon width". In a 512x512 icon that is a circle 410px across in the middle. Fill the rest with your background color.

web.dev also says: "We don't recommend using multiple purposes for maskable icons." An icon padded for masking looks small when used as any, and a normal icon gets its edges cut off when masked. Ship two files and two entries.

src resolves against the manifest URL

From MDN: "If src is relative, the path is resolved relative to the manifest file's URL." The page URL does not matter.

Manifest URLsrc valueBrowser requests
https://example.com/manifest.jsonimages/icon-192.pnghttps://example.com/images/icon-192.png
https://example.com/app/manifest.jsonicon-192.pnghttps://example.com/app/icon-192.png
https://example.com/app/manifest.json/icon-192.pnghttps://example.com/icon-192.png

If your app lives in a subfolder or your build tool moves the manifest, a root-relative path (/icon-192.png) or a full URL avoids surprises.

sizes and type

  • sizes takes WIDTHxHEIGHT values separated by spaces ("48x48 96x96"), or any for vector files. Declare the real pixel size of the file.
  • type is the MIME type: image/png, image/svg+xml or image/webp. MDN notes that browsers usually infer it from the extension when it is missing, but setting it costs nothing.
  • An ICO file can list several sizes in one entry, but Chrome's install check only accepts PNG, SVG and WebP.

Changing an installed app's icon

Browsers cache the manifest and its icons. When you change the icon, also change the file name (icon-512-v2.png) and update the src values, so no cache serves the old file. Then reload the page with DevTools open and check the Manifest section shows the new image.

Make the icon

Start from a square mark with no fine text. If you need one, browse the icon packs for a base symbol, or build a simple mark in the Free Logo Maker. Export it as SVG for the any entry, then render the PNG sizes from that same file.

FAQ

Does an SVG icon with sizes any make a PWA installable in Chrome?
In current Chromium source, yes: the install check accepts a square PNG, SVG or WebP icon of at least 144px or with sizes any, whose purpose includes any. web.dev's install criteria still list a 192px and a 512px icon, so add both PNGs as well.
Which icon sizes does a PWA manifest need?
192x192 and 512x512 PNG, per web.dev. Add an SVG with sizes any and a separate 512x512 maskable PNG for Android adaptive icons.
Can I use purpose any maskable on one icon?
It is valid, but web.dev does not recommend it. An icon padded for masking looks too small when shown as is. Use two entries with two files.
Is the icon src relative to the page or the manifest?
The manifest. A relative src resolves against the manifest file's URL, per MDN.
Do I still need favicon tags if I have a manifest?
Yes. Browser tabs use the link rel icon tags, and iOS uses apple-touch-icon. The manifest icons are for installed apps.

Related posts

Share this post