diff --git a/modules/image/image.module b/modules/image/image.module
index 258f12f..08fa344 100644
--- a/modules/image/image.module
+++ b/modules/image/image.module
@@ -993,6 +993,14 @@ function image_style_url($style_name, $path) {
   // The token query is added even if the 'image_allow_insecure_derivatives'
   // variable is TRUE, so that the emitted links remain valid if it is changed
   // back to the default FALSE.
+  $scheme = file_uri_scheme($path);
+  // If the path is a URI, normalize it like file_stream_wrapper_uri_normalize().
+  if ($scheme && file_stream_wrapper_valid_scheme($scheme)) {
+    $target = file_uri_target($path);
+    if ($target !== FALSE) {
+      $path = $scheme . '://' . $target;
+    }
+  }
   $token_query = array(IMAGE_DERIVATIVE_TOKEN => image_style_path_token($style_name, $path));
 
   // If not using clean URLs, the image derivative callback is only available
