Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update astro-images.mdoc #1342

Merged
merged 1 commit into from
Oct 29, 2024
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
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.
Loading