"Manifest doesn't have a maskable icon" error

Created on 16 August 2020, over 4 years ago
Updated 10 March 2024, 9 months ago

Missing attribute in LightHouse audit

Steps to reproduce

Most of all is ok but one issue is:

"A maskable icon ensures that the image fills the entire shape without being letterboxed when installing the app on a device."

To inderstand the message, goto DevTools of LightHouse

It says:

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.

Proposed resolution

I understand that in icons array, "purpose" attribute should be added with value "maskable", for each icon.

Remaining tasks

none

User interface changes

none

Extensions changes

In PWA module, open src/Manifest.php file.
From line 65, add this line for each kind of image:
line 69 add $manifest_data['icons'][0]['purpose'] = 'maskable';
line 74 add $manifest_data['icons'][1]['purpose'] = 'maskable';
line 79 add $manifest_data['icons'][2]['purpose'] = 'maskable';

Data model changes

none

📌 Task
Status

Needs work

Version

2.0

Component

Code

Created by

🇫🇷France frondeau Nantes, FRANCE

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024