[nextjs ์—๋Ÿฌ๋…ธํŠธ๐Ÿ”ฅ] 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..

๋„๋””ยท2024๋…„ 5์›” 7์ผ
0

nextjs <Image>๋ฅผ ์‚ฌ์šฉํ•˜๋‹ค๋ณด๋ฉด, ์—ฌ๋Ÿฌ warning๊ณผ ์กฐ์šฐํ•˜๊ฒŒ ๋˜๋Š”๋ฐ, ์ด๋ฒˆ์ฃผ๋Š” ์•„๋ž˜์˜ warning์ด๋‹ค.

Image with src "http://localhost:3000/logo-light.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.

๋ฌธ์ œ์ƒํ™ฉ

<a
	href="www.naver.com"
	target="_blank"
	className="w-[102px] h-[19.41px] ml-[24px]"
>
	<Image
		src="/logo-light.svg"
		alt="light Logo"
		width={102}
		height={19.41}
	/>
</a>

์ด๋Ÿฐ ์ €๋Ÿฐ ํ•ด๊ฒฐ๋ฐฉ๋ฒ•๋“ค์ด ์žˆ์—ˆ๋Š”๋ฐ, ์œ„์˜ ์ƒํ™ฉ์—์„œ๋Š” ๋ฌธ์ œ๊ฐ€ ์†Œ์ˆซ์ ์ด์—ˆ๋‹ค
์•„๋ž˜ ๊นƒํ—™ ๋Œ“๊ธ€์„ ์ฐธ๊ณ !

https://github.com/vercel/next.js/issues/40762#issuecomment-1473139712

profile
์ถฉ์ „์ค‘..๐Ÿค”

0๊ฐœ์˜ ๋Œ“๊ธ€