Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
문제
이미지 파일 크기가 너무 커서 로드하는 데 많은 시간이 걸린다.
해결
기존 총 34개의 파일 크기(jpg + png): 14.3MB
크기 감소 후 총 34개의 파일 크기(jpg + png): 4.9MB (기존에 비해 약 66% 감소)
포맷 변경 후 총 34개의 파일 크기(web): 1.1MB (기존에 비해 약 92% 감소)
Picture
컴포넌트를 만들어서 webp 호환 가능한 브라우저는 webp 파일을, 그렇지 않은 브라우저는 jpg 혹은 png 파일을 로드하도록 함추가
getImageSrc
함수를 통해 이미지 이름을 알면 이미지가 위치한 주소를 알 필요 없이 src를 만들어주도록 함