Skip to content

Next.js image 컴포넌트 사이징 이슈 #1

@song9252

Description

@song9252

이미지를 렌더링하고 width와 height를 조정하는 중, 이미지가 특정 크기 이상으로 커지지 않고 고정되는 문제가 발생했다

해당 코드
{/* 배경 이미지 */} <Image src='/images/macbook.png' alt='Background' width={1440} height={1080} className='w-full h-full object-contain' priority />

찾아보니 next.js에서 이미지 해상도가 원본 해상도 픽셀을 넘어갈 경우 정해진 breakpoint(임계값 포함) 몇 개에 걸린다고 한다.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions