From 0b277fd5f2a2af0477238be37a28d7b995f52ff5 Mon Sep 17 00:00:00 2001 From: madrilene Date: Fri, 28 Mar 2025 13:14:48 +0100 Subject: [PATCH] remove redundant resize before ICO generation, use 32 as default --- src/_config/setup/generate-favicons.js | 4 ++-- src/docs/favicons.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/_config/setup/generate-favicons.js b/src/_config/setup/generate-favicons.js index 0074c04..ca9fd51 100644 --- a/src/_config/setup/generate-favicons.js +++ b/src/_config/setup/generate-favicons.js @@ -31,8 +31,8 @@ async function createFavicons() { .toFile(`${outputDir}/maskable-icon.png`); // ICO icon - const iconSharp = sharp(svgBuffer).resize(16, 16); - await sharpsToIco([iconSharp], `${outputDir}/favicon.ico`, {sizes: [16]}); + const iconSharp = sharp(svgBuffer); + await sharpsToIco([iconSharp], `${outputDir}/favicon.ico`, {sizes: [32]}); console.log('All favicons generated.'); } diff --git a/src/docs/favicons.md b/src/docs/favicons.md index 533590f..05e84e6 100644 --- a/src/docs/favicons.md +++ b/src/docs/favicons.md @@ -18,4 +18,4 @@ In this case define the SVG icon on which all formats are based on in `meta.js`: export const pathToSvgLogo = 'src/assets/svg/misc/logo.svg'; // used for favicon generation ``` -Regardless of whether you generate the icons automatically or create them manually, it is best to keep the names so as not to break any reference to them. +Regardless of whether you generate the icons automatically or create them manually, it is best to keep the names so as not to break any reference to them. You can also use raster images instead of SVG.