--- a/insert.module
+++ b/insert.module
@@ -406,9 +406,19 @@ function insert_create_url($uri, $absolute = NULL, $clean_urls = TRUE) {
     $url = file_create_url($uri);
   }
 
-  if (!$absolute && strpos($url, $GLOBALS['base_url']) === 0) {
-    $url = base_path() . ltrim(str_replace($GLOBALS['base_url'], '', $url), '/');
+  if (!$absolute) {
+    if (strpos($url, $GLOBALS['base_url']) === 0) {
+      $url = base_path() . ltrim(str_replace($GLOBALS['base_url'], '', $url), '/');
+    }
+    else {
+      $scheme = file_uri_scheme($uri);
+      $local_schemes = array_keys(file_get_stream_wrappers(STREAM_WRAPPERS_LOCAL)); 
+      if (in_array($scheme,$local_schemes)) { // If it's a local stream wrapper
+        $url = preg_replace("#^((http|https):)?//[^/]+/#i", "/", $url);   // Strip off the domain
+      }
+    }
   }
+
   return $url;
 }
 
