-
Notifications
You must be signed in to change notification settings - Fork 165
Open
Description
Hi,
why can't I generate favicons larger than 48x48
I tried:
favicons: [
'favicon-16x16.png',
'favicon-32x32.png',
'favicon-96x96.png',
'favicon-128x128.png',
'favicon.ico',
],
but only there were created:
created favicon-16x16.png
created favicon-32x32.png
created favicon.ico
const configuration = {
logging: false,
icons: {
favicons: [
'favicon-16x16.png',
'favicon-32x32.png',
'favicon-96x96.png',
'favicon-128x128.png',
'favicon.ico',
],
android: false,
appleIcon: true,
appleStartup: false,
windows: false,
yandex: false,
},
};
async function run() {
const iconsPath = path.join(OUTPUT, 'icons');
if (!fs.existsSync(iconsPath)) {
fs.mkdirSync(iconsPath, { recursive: true });
}
const response = await favicons(SOURCE, configuration);
await Promise.all(
response.images.map(async (image) => {
let outputPath;
if (image.name === 'favicon.ico') {
outputPath = path.join(OUTPUT, image.name);
} else {
outputPath = path.join(OUTPUT, 'icons', image.name);
}
await fs.promises.writeFile(outputPath, image.contents);
console.log('created ' + image.name);
}),
);
console.log('Favicon generation completed!');
}
run().catch(console.error);
Metadata
Metadata
Assignees
Labels
No labels