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

The background is empty when source image has special characters in its name #5

Open
riverside opened this issue Mar 11, 2017 · 0 comments

Comments

@riverside
Copy link

Please note that the parentheses, commas, whitespace characters, single and double quotes appearing in a URI must be escaped with a backslash. This plugin does not escape the image URI. The result is that images are not displayed when are named like this: my-image (1).jpg

The easiest way to fix it is to enclose the image URI with quotes. So, this line:

'background-image' : 'url(' + $image[0].src + ')',

could be replaced with:

'background-image' : 'url("' + $image[0].src + '")',

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

1 participant