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 assets paths not correctly resolved if using URL base in site config #6504

Closed
1 task
songololo opened this issue Mar 10, 2023 · 1 comment · Fixed by #6643
Closed
1 task

Image assets paths not correctly resolved if using URL base in site config #6504

songololo opened this issue Mar 10, 2023 · 1 comment · Fixed by #6643
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: assets Related to the Assets feature (scope)

Comments

@songololo
Copy link

What version of astro are you using?

2.1.2

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

I'm trying the new experimental assets optimisation for images.

During development everything works as intended.

When building the site, everything works as intended when using a base path prefix of /.

However, the build breaks if using a base path other than /, e.g. if using test as a basepath, then it tries to use the following style of path:
error ENOENT: no such file or directory, open '/path/to/repo/astro-minimal/dist/test/_astro/ginger_cat.509f05b4.jpeg'

Note that test has been inserted between dist and _astro.

Link to Minimal Reproducible Example

https://github.com/songololo/astro-minimal

Participation

  • I am willing to submit a pull request for this issue.
@Princesseuh Princesseuh added feat: assets Related to the Assets feature (scope) - P4: important Violate documented behavior or significantly impacts performance (priority) labels Mar 10, 2023
@Princesseuh Princesseuh changed the title Image integration asset paths not correctly resolved if using URL base in site config Image assets paths not correctly resolved if using URL base in site config Mar 10, 2023
@Princesseuh
Copy link
Member

Thank you for submitting this issue! I just renamed the issue to clear up any possible confusion with the old @astrojs/image integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: assets Related to the Assets feature (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants