Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/content/docs/ko/guides/images.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ import myImage from '../assets/my_image.png'; // 1600x900의 이미지

이러한 속성은 이미지에 사용할 크기를 정의합니다.

이미지를 원본 가로세로 비율로 사용하는 경우 `width` 및 `height`는 선택사항입니다. 이러한 크기는 `src/` 디렉터리에 있는 이미지 파일과 [`inferSize``true`로 설정된](#infersize) 원격 이미지에서 자동으로 추론될 수 있습니다.
이미지를 원본 가로세로 비율로 사용하는 경우 `width` 및 `height`는 선택사항입니다. 이러한 치수는 `src/`있는 이미지 파일에서 자동으로 유추할 수 있습니다. 원격 이미지의 경우 `<Image />` 또는 `<Picture />` 컴포넌트의 [`inferSize` 속성을 `true`로 설정](#infersize)하거나 [`inferRemoteSize()` 함수](#inferremotesize)를 사용하세요.

그러나 Astro는 이러한 파일을 분석할 수 없으므로 `public/` 폴더에 저장된 이미지에는 이 두 속성이 모두 필요합니다.

Expand Down Expand Up @@ -266,6 +266,17 @@ import { Image } from 'astro:assets';

`inferSize`는 [승인되지 않은 도메인의 원격 이미지](#원격-이미지-승인)의 크기를 가져올 수 있지만 이미지 자체는 처리되지 않은 상태로 유지됩니다.

###### inferRemoteSize()

<p><Since v="4.12.0" /></p>

원격 이미지의 크기를 유추하는 함수입니다. 이 함수는 `inferSize` 프로퍼티를 전달하는 대신 사용할 수 있습니다.

```ts
import { inferRemoteSize } from 'astro:assets';
const {width, height} = await inferRemoteSize("https://example.com/cat.png");
```

##### 추가 속성

위 속성 외에도 `<Image />` 컴포넌트는 HTML `<img>` 태그에서 허용하는 모든 속성을 허용합니다.
Expand Down