-
Notifications
You must be signed in to change notification settings - Fork 10
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
Unable to properly parse image-url when used in a background-image url() #4
Comments
Thanks for reporting! I'll look into it soon :) |
It will be dificult for me to find the regex needed to support url sources, those are more complex than the regular For a start I can think of the need to find a regex against the following kind of samples (regex101 here): url(https://my-api.com:1337/my-image.png.png) url(https://my-api.com:1337/my-image.png.png?itok=de78r5) url(https://my-api.com:1337/(myimage)(nice).png.png) url(https://my-api.com:1337/(myimage)(nice).png.png?itok=de78r5) That regex should grab the exact image link leaving out everything else. Just as GitHub did when I pasted the previous list 😆. May be @emiliobondioli could help us finding it. |
Hi @d1urno, |
@TotomInc using double quote syntax like @emiliobondioli nuxt-magpie is looking good, thanks for your contributions! |
Hi! First I want to say that this is a great module and has been working well for me so far! Recently I used a style binding on an element and I'm running into the issue as mentioned above - extra ')' at the end of the image file. Since I'm still quite new to vue/nuxt I was wondering that maybe there is a better way to tackle this issue using different binding or logic in vue? |
@case112 computed: {
getStyle() {
return {
backgroundImage: `linear-gradient(rgba(0, 0, 0, 0.15), url("${this.banner_data.image_url}")`
}
}
} <div class="hero-image" :style="getStyle"> |
I'm using a lot of
background-image: url(...)
and images are incorrectly parsed (by the regex I think?).Here is an example output:
url(https://my-api.com:1337/my-image.png)
will generate/dist/_images/my-image.png)
instead of/dist/_images/my-image.png
.The text was updated successfully, but these errors were encountered: