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
6 changes: 4 additions & 2 deletions src/content/docs/en/guides/integrations-guide/markdoc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ To override the default image node, you can configure an `.astro` component to b

```astro title="src/components/MarkdocImage.astro"
---
import type { ImageMetadata } from "astro";
import { Image } from "astro:assets";
interface Props {
src: ImageMetadata;
Expand All @@ -431,8 +432,9 @@ To override the default image node, you can configure an `.astro` component to b

2. The `<Image />` component requires a `width` and `height` for remote images which cannot be provided using the `![]()` syntax. To avoid errors when using remote images, update your component to render a standard HTML `<img>` tag when a remote URL `src` is found:

```astro title="src/components/MarkdocImage.astro" ins="| string" del={9} ins={10-12}
```astro title="src/components/MarkdocImage.astro" ins="| string" del={10} ins={11-13}
---
import type { ImageMetadata } from "astro";
import { Image } from "astro:assets";
interface Props {
src: ImageMetadata | string;
Expand Down Expand Up @@ -484,7 +486,7 @@ The following steps will create a custom Markdoc image tag to display a `<figure

```astro title="src/components/MarkdocFigure.astro"
---
// src/components/MarkdocFigure.astro
import type { ImageMetadata } from "astro";
import { Image } from "astro:assets";

interface Props {
Expand Down