Skip to content

![]() with astro:assets doesn't work in MDX #6777

@Steffan153

Description

@Steffan153

What version of astro are you using?

2.2.0

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

In normal Markdown code, I can do ![image](../../assets/...) and the image will load fine. If I switch to MDX, this no longer works and interprets it as a literal link. Instead, I have to just import the image and then use it with Image or img. This is annoying with articles with lots of images.

Link to Minimal Reproducible Example

https://codesandbox.io/p/sandbox/jolly-pateu-uwe67g

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

Labels

feat: assetsRelated to the Assets feature (scope)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions