diff --git a/lib/Less/Node/Url.php b/lib/Less/Node/Url.php
index <HASH>..<HASH> 100755
--- a/lib/Less/Node/Url.php
+++ b/lib/Less/Node/Url.php
@@ -22,6 +22,16 @@ class Url
     {
 		$val = $this->value->compile($ctx);
 
+		// Add the base path if the URL is relative
+		if( is_string($val->value) && !preg_match('/^(?:[a-z-]+:|\/)/',$val->value) ){
+			$rootpath = $this->rootpath;
+			if ( !$val->quote ){
+				$rootpath = preg_replace('/[\(\)\'"\s]/', '\\$1', $rootpath );
+			}
+			$val->value = $rootpath . $val->value;
+		}
+
+
 		return new \Less\Node\URL($val, $this->rootpath);
     }
 
diff --git a/lib/Less/Parser.php b/lib/Less/Parser.php
index <HASH>..<HASH> 100755
--- a/lib/Less/Parser.php
+++ b/lib/Less/Parser.php
@@ -539,7 +539,7 @@ class Parser {
 
 
         return new \Less\Node\Url((isset($value->value) || $value instanceof \Less\Node\Variable)
-                            ? $value : new \Less\Node\Anonymous($value), '');
+                            ? $value : new \Less\Node\Anonymous($value), $this->env->rootpath);
     }
When adding a path onto an unquoted url, escape characters that require it