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

Allow local images to start with src/assets as well as ~/assets #554

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tomrcc
Copy link

@tomrcc tomrcc commented Nov 20, 2024

I'm trying to use Astrowind on CloudCannon, a CMS for static sites.
When we add images via CloudCannon they are added at the actual path - without the alias (eg. /src/assets/images/).
This would throw an error that it cannot parse the image Url.

This refactor allows either image path to work.

@deepanshu88
Copy link

It has stopped working for '~/assets/images/hero-image.png'

@tomrcc
Copy link
Author

tomrcc commented Nov 25, 2024

Sorry @deepanshu88, I can't see where it's no longer working for ~/assets/images/hero-image.png?
I've confirmed the hero-image renders with the paths '~/assets/images/hero-image.png' and '/src/assets/images/hero-image.png' on the homepage, and on a blog post.

Any chance you could point me in the right direction to see where it's failing for you?

@tomrcc
Copy link
Author

tomrcc commented Nov 26, 2024

Apologies, @deepanshu88, I can see where it was broken now!
Would you mind testing it again to see if that works as intended now?

@tomrcc
Copy link
Author

tomrcc commented Dec 2, 2024

Bump @deepanshu88

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

Successfully merging this pull request may close these issues.

2 participants