Skip to content

Commit

Permalink
i18n(ko-KR): update image-service-reference.mdx (#9515)
Browse files Browse the repository at this point in the history
Co-authored-by: Yan <[email protected]>
  • Loading branch information
jsparkdev and yanthomasdev authored Oct 1, 2024
1 parent cb6a947 commit 5e409b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/content/docs/ko/reference/image-service-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,13 @@ const service: LocalImageService = {
loading: attributes.loading ?? 'lazy',
decoding: attributes.decoding ?? 'async',
};
}
},
propertiesToHash: ['src', 'width', 'height', 'format', 'quality'],
};
export default service;
```
정적 사이트와 사전 렌더링된 경로 빌드 시 `<Image />``getImage(options)`는 모두 `transform()` 함수를 호출합니다. 각각 컴포넌트의 속성이나 `options` 인수를 통해 옵션을 전달합니다. 변환된 이미지는 `dist/_astro` 폴더에 빌드됩니다.
정적 사이트와 사전 렌더링된 경로 빌드 시 `<Image />``getImage(options)`는 모두 `transform()` 함수를 호출합니다. 각각 컴포넌트의 속성이나 `options` 인수를 통해 옵션을 전달합니다. 변환된 이미지는 `dist/_astro` 폴더에 빌드됩니다. 파일 이름에는 `propertiesToHash`에 전달된 속성의 해시가 포함됩니다. 이 속성은 선택 사항이며 기본값은 `['src', 'width', 'height', 'format', 'quality']`입니다. 사용자 정의 이미지 서비스에 생성된 이미지를 변경하는 추가 옵션이 있는 경우 배열에 추가합니다.
개발 모드와 SSR 모드에서 Astro는 어떤 이미지를 최적화해야 하는지 미리 알 수 없습니다. Astro는 GET 엔드포인트 (기본적으로 `/_image`)를 사용하여 런타임에 이미지를 처리합니다. `<Image />``getImage()`는 해당 옵션을 `getURL()`에 전달하여 엔드포인트 URL을 반환합니다. 그런 다음 엔드포인트는 `parseURL()`을 호출하고 결과 속성을 `transform()`에 전달합니다.
Expand Down

0 comments on commit 5e409b1

Please sign in to comment.