Skip to content

Commit

Permalink
i18n(zh-cn): Update images.mdx (#11100)
Browse files Browse the repository at this point in the history
Co-authored-by: liruifengv <[email protected]>
  • Loading branch information
Nin3lee and liruifengv authored Mar 3, 2025
1 parent c5cf947 commit 1283ecb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/content/docs/zh-cn/guides/images.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export default defineConfig({

## Markdown 文件中的图像

`.md` 文件中使用标准的 Markdown `![alt](src)` 语法。这个语法可以与 Astro 的 [图像服务 API](/zh-cn/reference/image-service-reference/) 一起使用,来优化你在 `src/` 目录下的本地图像。远程图像和 `public/` 目录下的本地图像不会被优化。
`.md` 文件中使用标准的 Markdown `![alt](src)` 语法。这个语法可以与 Astro 的 [图像服务 API](/zh-cn/reference/image-service-reference/) 一起使用,来优化你在 `src/` 目录下的本地图像和远程图像。`public/` 目录下的本地图像不会被优化。

```md
<!-- src/pages/post-1.md -->
Expand All @@ -291,9 +291,9 @@ export default defineConfig({
![Astro](https://example.com/images/remote-image.png)
```

`.md` 文件中,`<img>` 标签不支持本地图像,并且 `<Image />``<Picture />` 组件也不可用
HTML 的 `<img>` 标签可用于显示存储在 `public/` 下的图像或是远程图像,不过这些图像不会进行任何图像优化或处理。但是,`<img>` 不支持显示在 `src` 中的本地图像

如果你需要对图像属性做更多的控制,我们建议使用 [Astro 的 MDX 集成](/zh-cn/guides/integrations-guide/mdx/) 来添加对 `.mdx` 文件格式的支持。MDX 允许向 Markdown 添加组件,并且还提供其他 [MDX 中可用的图像选项](#mdx-文件中的图像)
`.md` 文件中,`<Image />``<Picture />` 组件不可用。如果你需要对图像属性做更多的控制,我们建议使用 [Astro 的 MDX 集成](/zh-cn/guides/integrations-guide/mdx/) 来添加对 `.mdx` 文件格式的支持。MDX 提供其他 [MDX 中可用的图像选项](#mdx-文件中的图像),其中还包括通过 Markdown 语法来使用组件

## MDX 文件中的图像

Expand Down

0 comments on commit 1283ecb

Please sign in to comment.