Next.js Discord

Discord Forum

how to fix "Image src "/Logo.svg" has either width or height modified, but not the other" warning

Unanswered
Rex posted this in #help-forum
Open in Discord
RexOP
i am getting this warning in my console
Image with src "/Logo.svg" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: "auto"' or 'height: "auto"' to maintain the aspect ratio.

but I have set both the width and height of teh logo
<Link href="/" className=" cursor-pointer">
   <Image src="/Logo.svg" width={85} height={70} alt="Logo" />
</Link>

I googled and didn't find anything helpful. How can I fix this warning?

0 Replies