-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
- P2: has workaroundBug, but has workaround (priority)Bug, but has workaround (priority)feat: assetsRelated to the Assets feature (scope)Related to the Assets feature (scope)regression
Description
Astro Info
Astro v5.15.7
Node v20.19.1
System Linux (x64)
Package Manager unknown
Output static
Adapter none
Integrations @astrojs/mdx
@astrojs/sitemap
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Continuing the thread at #14590.
When a JSON file used for a collection contains an image path that is treated as image() by the content layer, Astro throws an error saying the image does not exist.
The error message has an additional ./ preceding the file path. For example, this message is shown:
Could not find requested image ./src/assets/blog-placeholder-2.jpg. Does it exist?
Whereas the image path as defined in the JSON is "src/assets/blog-placeholder-2.jpg".
What's the expected result?
In previous versions, the image was found.
In v5.14.7, an error message showing the actual value from the JSON was shown:
Could not find requested image src/assets/blog-placeholder-2.jpg. Does it exist?
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-uy9ezbj7?file=src%2Fcontent.config.ts
Participation
- I am willing to submit a pull request for this issue.
BuckyBuck135
Metadata
Metadata
Assignees
Labels
- P2: has workaroundBug, but has workaround (priority)Bug, but has workaround (priority)feat: assetsRelated to the Assets feature (scope)Related to the Assets feature (scope)regression