Skip to content

Commit

Permalink
i18n(ko-KR): add expected-not-esmimage.mdx (#8597)
Browse files Browse the repository at this point in the history
Co-authored-by: Yan <[email protected]>
  • Loading branch information
jsparkdev and yanthomasdev committed Jun 20, 2024
1 parent bd071f9 commit 16ef037
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/content/docs/ko/reference/errors/expected-not-esmimage.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Expected image options, not an ESM-imported image.
i18nReady: true
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
---

> **ExpectedNotESMImage**: An ESM-imported image cannot be passed directly to `getImage()`. Instead, pass an object with the image in the `src` property.
## 무엇이 잘못되었나요?
ESM에서 가져온 이미지는 `getImage()`에 직접 전달할 수 없습니다. 대신 `src` 속성에 이미지가 포함된 객체를 전달하세요.

```diff
import { getImage } from "astro:assets";
import myImage from "../assets/my_image.png";
- const optimizedImage = await getImage( myImage );
+ const optimizedImage = await getImage({ src: myImage });
```

**더 보기:**
- [이미지](/ko/guides/images/)


0 comments on commit 16ef037

Please sign in to comment.