What Makes PWA Icons Different?
Progressive Web App icons go beyond traditional favicons. They need to work as app icons on home screens, splash screens, and in app launchers across different devices and operating systems.
PWA Icon Requirements
Regular Icons (purpose: "any")
- 192x192: Standard icon size
- 512x512: Splash screen, high-DPI
These work like normal icons - entire image is visible without cropping.
Maskable Icons (purpose: "maskable")
- 192x192: Adaptive home screen
- 512x512: Large adaptive icon
Designed with 80% safe zone. Edges may be cropped to fit device's shape.
Understanding Maskable Icons
Maskable icons are specifically designed for Android's adaptive icon system. They allow your icon to conform to the shape preferences of different device manufacturers.
The 80% Safe Zone Rule
Safe Zone (Center 80%)
In a 512x512 icon, the safe zone is approximately 410x410 pixels centered.
- ✅ Place your logo here
- ✅ Critical text or elements
- ✅ Always visible, never cropped
Bleed Area (Outer 20%)
The outer 51 pixels on each side (102 pixels total per dimension).
- ⚠️ Background color/pattern only
- ⚠️ May be cropped on some devices
- ⚠️ No important content here
Creating Maskable Icons
- Start with your regular 512x512 icon
- Scale your logo to fit within center 80% (410x410 area)
- Add solid background color or subtle pattern in outer 20%
- Test with Maskable.app Editor
- Export and add to manifest with "purpose": "maskable"
Complete manifest.json Structure
{
"name": "My Progressive Web App",
"short_name": "MyPWA",
"icons": [
{
"src": "/icon-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any"
},
{
"src": "/icon-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any"
}
],
"start_url": "/",
"display": "standalone",
"theme_color": "#2196f3",
"background_color": "#ffffff"
}Manifest Field Explanations
start_url
URL to load when app launches from home screen
display
standalone = full screen app, browser = with browser UI
theme_color
Colors the browser toolbar and status bar
background_color
Splash screen background while app loads
scope
URLs that belong to the app (defaults to start_url)
orientation
Lock to portrait, landscape, or allow any
Splash Screen Configuration
PWAs automatically generate splash screens from your manifest data. The splash screen appears briefly when launching the app from the home screen.
Splash Screen Components
- Background: Uses `background_color` from manifest
- Icon: Uses largest "any" purpose icon (512x512)
- App name: Uses `name` from manifest
- Theme color: Status bar uses `theme_color`
Install Prompt Customization
You can customize the install experience using the `beforeinstallprompt` event:
let deferredPrompt;
window.addEventListener('beforeinstallprompt', (e) => {
// Prevent the mini-infobar from appearing
e.preventDefault();
// Store the event for later use
deferredPrompt = e;
// Show your custom install button
showInstallButton();
});
function showInstallButton() {
const installButton = document.getElementById('install-btn');
installButton.style.display = 'block';
installButton.addEventListener('click', async () => {
// Show the install prompt
deferredPrompt.prompt();
// Wait for the user's response
const { outcome } = await deferredPrompt.userChoice;
console.log(`User response: ${outcome}`);
// Clear the deferredPrompt
deferredPrompt = null;
});
}Service Worker Integration
PWAs require a service worker for offline functionality and install capability:
// Register service worker in your main JS file
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker
.register('/sw.js')
.then(reg => console.log('SW registered:', reg))
.catch(err => console.log('SW registration failed:', err));
});
}Testing PWA Icons with Lighthouse
Google Lighthouse audits your PWA setup. Here's what it checks for icons:
Lighthouse PWA Icon Checklist
Manifest includes 192x192 icon
Required for installability
Manifest includes 512x512 icon
Required for splash screen
Maskable icon provided
Bonus points for adaptive icons
Icons are PNG format
Required for transparency support
All icon files exist (no 404s)
Lighthouse verifies URLs are valid
Desktop vs Mobile PWA Icons
Desktop PWAs (Chrome, Edge)
- Uses 192x192 icon in app launcher
- No maskable support (uses regular icons)
- Appears in Start Menu/Dock
- Window frame shows 32x32 favicon
Mobile PWAs (Android)
- Uses maskable icons if provided
- Falls back to regular icons
- Appears on home screen like native apps
- Adaptive icon shapes per device
Browser Support for PWA Icons
| Feature | Chrome | Edge | Safari | Firefox |
|---|---|---|---|---|
| Basic PWA | ✅ Full | ✅ Full | ⚠️ Limited | ⚠️ Limited |
| Maskable icons | ✅ v93+ | ✅ v93+ | ❌ No | ❌ No |
| Install prompt | ✅ Full | ✅ Full | ✅ iOS 16.4+ | ❌ No |
| Desktop PWA | ✅ Full | ✅ Full | ❌ No | ❌ No |
Common PWA Icon Issues
Issue: Install Button Not Showing
The beforeinstallprompt event isn't firing.
Solutions:
- ✓ Verify site is served over HTTPS
- ✓ Ensure service worker is registered
- ✓ Check manifest.json is valid and linked
- ✓ User hasn't already installed the PWA
- ✓ User has engaged with site (30+ seconds dwell time)
Issue: Icons Not Updating
Old icons still showing after update.
Solutions:
- ✓ Change icon filenames (cache busting)
- ✓ Uninstall and reinstall PWA
- ✓ Clear browser cache and service worker
- ✓ Wait 24-48 hours for automatic update
Generate PWA-Ready Icons
Our favicon generator creates all PWA icon sizes including maskable variants, plus a complete manifest.json file. Everything needed for Lighthouse 100/100.
Create PWA Icons Now →