Skip to content

Commit

Permalink
#237 Fixed Manifest icons purpose warning
Browse files Browse the repository at this point in the history
  • Loading branch information
syedimran22 committed Dec 14, 2021
1 parent b2f9e17 commit ca128da
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion public/manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,13 @@ function superpwa_get_pwa_icons() {
'src' => $settings['icon'],
'sizes' => '192x192', // must be 192x192. Todo: use getimagesize($settings['icon'])[0].'x'.getimagesize($settings['icon'])[1] in the future
'type' => 'image/png', // must be image/png. Todo: use getimagesize($settings['icon'])['mime']
'purpose'=> 'any maskable', // any maskable to support adaptive icons
'purpose'=> 'any', // any maskable to support adaptive icons
);
$icons_array[] = array(
'src' => $settings['icon'],
'sizes' => '192x192', // must be 192x192. Todo: use getimagesize($settings['icon'])[0].'x'.getimagesize($settings['icon'])[1] in the future
'type' => 'image/png', // must be image/png. Todo: use getimagesize($settings['icon'])['mime']
'purpose'=> 'maskable', // any maskable to support adaptive icons
);

// Splash screen icon - Added since 1.3
Expand All @@ -292,6 +298,13 @@ function superpwa_get_pwa_icons() {
'src' => $settings['splash_icon'],
'sizes' => '512x512', // must be 512x512.
'type' => 'image/png', // must be image/png
'purpose'=> 'any',
);
$icons_array[] = array(
'src' => $settings['splash_icon'],
'sizes' => '512x512', // must be 512x512.
'type' => 'image/png', // must be image/png
'purpose'=> 'maskable',
);
}

Expand Down

0 comments on commit ca128da

Please sign in to comment.