> [!CAUTION]
> **Caution:** PWA testing in Lighthouse is deprecated. For more information on its deprecation see [Chrome's updated Installability Criteria](https://developer.chrome.com/blog/update-install-criteria.md.txt). For guidance on testing, refer to the [PWA documentation.](https://developer.chrome.com/docs/devtools/progressive-web-apps.md.txt)

[Maskable icons](https://web.dev/maskable-icon/) is a new icon format that ensures that your PWA icon looks
great on all Android devices. On newer Android devices, PWA icons that don't follow
the maskable icon format are given a white background. When you use a maskable
icon, it ensures that the icon takes up all of the space that Android provides for it.

## How the Lighthouse maskable icon audit fails

[Lighthouse](https://developer.chrome.com/docs/lighthouse/overview.md.txt)
flags pages that don't have maskable icon support:
![The maskable icon audit in the Lighthouse Report UI.](https://developer.chrome.com/static/docs/lighthouse/pwa/maskable-icon-audit/image/the-maskable-icon-audit-841c7d6b5f214.jpg)

In order to pass the audit:

- A web app manifest must exist.
- The web app manifest must have an `icons` array.
- The `icons` array must contain one object with a `purpose` property, and the value of that `purpose` property must include `maskable`.

> [!CAUTION]
> **Caution:** Lighthouse does not inspect the image that's specified as the maskable icon. You'll need to manually verify that the image displays well.

> [!NOTE]
> **Note:** Each Best Practices audit is weighted equally in the Lighthouse Best Practices Score. Learn more in [The Best Practices
> score](https://developer.chrome.com/docs/lighthouse/performance/performance-scoring#best-practices).

## How to add maskable icon support to your PWA

1. Use [Maskable.app Editor](https://maskable.app/editor) to convert an existing icon to a maskable icon.
2. Add the `purpose` property to one of the `icons` objects in your [web app manifest](https://developer.chrome.com/docs/extensions/reference/manifest.md.txt).
   Set the value of `purpose` to `maskable`. See [Values](https://developer.mozilla.org/docs/Web/Manifest/icons#Values).

       {
         ...
         "icons": [
           ...
           {
             "src": "path/to/maskable_icon.png",
             "sizes": "196x196",
             "type": "image/png",
             "purpose": "maskable"
           }
         ]
         ...
       }

3. Use Chrome DevTools to verify that the maskable icon is displaying correctly.
   See [Are my current icons ready?](https://web.dev/articles/maskable-icon#are_my_current_icons_ready)

## Resources

- [Source code for **Manifest doesn't have a maskable icon** audit](https://github.com/GoogleChrome/lighthouse/blob/main/core/audits/maskable-icon.js)
- [Adaptive icon support in PWAs with maskable icons](https://web.dev/maskable-icon/)
- [Maskable.app Editor](https://maskable.app/editor)
- [Add a web app manifest](https://developer.chrome.com/docs/extensions/reference/manifest.md.txt)
- [The `icons` property on MDN](https://developer.mozilla.org/docs/Web/Manifest/icons)