Skip to content

Commit

Permalink
Update astro-images.mdoc (#1342)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayan-Choudhury-dev authored Oct 29, 2024
1 parent c81e18b commit 610eb37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/content/pages/recipes/astro-images.mdoc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Just like standalone image fields, you will need to configure the Zod schema wit

Using Astro assets within [content components](/docs/content-components) is a little more complicated.

Since the image is not stored in the frontmatter data but directly within the content body, you'll need to dynamically import the image inside the compopnent you're using to render that content component.
Since the image is not stored in the frontmatter data but directly within the content body, you'll need to dynamically import the image inside the component you're using to render that content component.

{% aside icon="⚠️" %}
The `publicPath` for those images must start with `/src/assets` for the dynamic import to work in Astro 😅
Expand All @@ -113,4 +113,4 @@ captionImage: block({
})
```

Read the [Astro guide on dynamic image imports](https://docs.astro.build/en/recipes/dynamically-importing-images/) for details on the implementation.
Read the [Astro guide on dynamic image imports](https://docs.astro.build/en/recipes/dynamically-importing-images/) for details on the implementation.

0 comments on commit 610eb37

Please sign in to comment.