diff --git a/backend/src/config/logo.service.ts b/backend/src/config/logo.service.ts index 1fdadcaf..0b81937e 100644 --- a/backend/src/config/logo.service.ts +++ b/backend/src/config/logo.service.ts @@ -7,7 +7,8 @@ const IMAGES_PATH = "../frontend/public/img"; @Injectable() export class LogoService { async create(file: Buffer) { - fs.writeFileSync(`${IMAGES_PATH}/logo.png`, file, "binary"); + const resized = await sharp(file).resize(900).toBuffer(); + fs.writeFileSync(`${IMAGES_PATH}/logo.png`, resized, "binary"); this.createFavicon(file); this.createPWAIcons(file); } @@ -25,7 +26,7 @@ export class LogoService { fs.promises.writeFile( `${IMAGES_PATH}/icons/icon-${size}x${size}.png`, resized, - "binary", + "binary" ); } } diff --git a/frontend/.eslintrc.json b/frontend/.eslintrc.json index bfea7a17..00b0a541 100644 --- a/frontend/.eslintrc.json +++ b/frontend/.eslintrc.json @@ -11,6 +11,7 @@ "react-hooks/exhaustive-deps": ["off"], "import/no-anonymous-default-export": ["off"], "no-unused-vars": ["warn"], - "react/no-unescaped-entities": ["off"] + "react/no-unescaped-entities": ["off"], + "@next/next/no-img-element": ["off"] } } diff --git a/frontend/public/img/logo.png b/frontend/public/img/logo.png index 340efd29..bb7ea122 100644 Binary files a/frontend/public/img/logo.png and b/frontend/public/img/logo.png differ diff --git a/frontend/src/components/Logo.tsx b/frontend/src/components/Logo.tsx index c69c50c0..44fe2e44 100644 --- a/frontend/src/components/Logo.tsx +++ b/frontend/src/components/Logo.tsx @@ -1,6 +1,4 @@ -import Image from "next/image"; - const Logo = ({ height, width }: { height: number; width: number }) => { - return logo; + return logo; }; export default Logo;