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

Image not found when file name contains a space #8562

Closed
mossymaker opened this issue Jun 18, 2024 · 1 comment
Closed

Image not found when file name contains a space #8562

mossymaker opened this issue Jun 18, 2024 · 1 comment

Comments

@mossymaker
Copy link

When a markdown document includes an image with a space in the filename, Astro reports "image not found". The URL encoded space seems to get decoded.

src/content/docs/reference/network/System Diagram.md

---
title: System Diagram
---

![Network Diagram](../../../../assets/Network%20Diagram.svg)

If the file is renamed to remove the space and the path is updated, Astro finds the image.

Here's the trace:

ImageNotFound: Could not find requested image `../../../../assets/Network%20Diagram.svg`. Does it exist?
    at LoadPluginContext.load (file:https:///Users/.../node_modules/astro/dist/assets/vite-plugin-assets.js:179:19)
    at async PluginContainer.load (file:https:///Users/.../node_modules/vite/dist/node/chunks/dep-BcXSligG.js:49511:22)
    at async loadAndTransform (file:https:///Users/.../node_modules/vite/dist/node/chunks/dep-BcXSligG.js:52306:22)
    at async instantiateModule (file:https:///Users/.../node_modules/vite/dist/node/chunks/dep-BcXSligG.js:53309:44)
@sarah11918
Copy link
Member

Hi @mossymaker ! Thank you for mentioning this! However, this is the repo for reporting issues with the documentation site, and I believe this is something that should be brought to the attention of the code repo itself as a potential bug.

Could you please instead file an issue in the astro code repo and fill out their template for reporting issues like this?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants