The background is empty when source image has special characters in its name
riverside opened this issue · 0 comments
riverside commented
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 + '")',