question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support maskable icons

See original GitHub issue

Android and other OSes now support auto-masking / cropping icons when a parameter in the icons is set. Would be nice with support for it! Should just be passing purpose: "maskable" if the developer has set it.

https://css-tricks.com/maskable-icons-android-adaptive-icons-for-your-pwa/

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
thequailmancommented, Feb 6, 2020

I think this repo is dead, and I don’t want to be beholden to this repo adding the random properties for PWA manifests going forward. I spent some time figuring out how to do this with extract-loader and remove this plugin as a dependency, and I’m pretty happy with the results:

manifest.js

const Icon192 = require("./images/192.png")
const Icon512 = require("./images/512.png")

const manifest = {
	icons: [
		{
			src: Icon512,
			sizes: "512x512",
			type: "image/png",
		},
		{
			src: Icon192,
			sizes: "192x192",
			type: "image/png",
		},
	],
	name: "App",
	short_name: "App",
	orientation: "portrait",
	display: "standalone",
	start_url: "/",
	background_color: "#ffffff",
	description: "description",
}

module.exports = JSON.stringify(manifest, null, 2)

webpack.config.js

		{
				test: /manifest.js$/,
				use: [
					{
						loader: "file-loader",
						options: {
							name: "ui/[name].[hash].json",
						},
					},
					"extract-loader",
				],
			},

index.html (using html-webpack-plugin)

		<link rel="manifest" href="${require("./manifest.js")}">
1reaction
thequailmancommented, Jan 7, 2020

That PR fixes this issue for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adaptive icon support in PWAs with maskable icons - web.dev
Maskable icons are a new icon format that give you more control and let your Progressive Web App use adaptive icons. If you...
Read more >
Maskable Icons: Android Adaptive Icons for Your PWA
Do you want to see what your own maskable icons will look like? I've created a tool, Maskable.app, to help you evaluate how...
Read more >
Maskable.app
Maskable icons allow web developers to specify a full-bleed icon that will be cropped by the user-agent to match other icons on the...
Read more >
Manifest doesn't have a maskable icon - Chrome Developers
Maskable icons is a new icon format that ensures that your PWA icon looks great on all Android devices. On newer Android devices,...
Read more >
Maskable icons - Optimize your web projects with Progressive ...
Maskable icons are a new way to optimize the layout of PWA icons on recent Android devices. We'll cover the following. The starting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found