Browse Source

A dataurl is already a dataurl

gero3 5 years ago
parent
commit
f06197bb78
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/extras/ImageUtils.js

+ 5 - 1
src/extras/ImageUtils.js

@@ -12,7 +12,11 @@ const ImageUtils = {
 
 
 		let canvas;
 		let canvas;
 
 
-		if ( typeof HTMLCanvasElement == 'undefined' ) {
+		if ( image.src.startsWith( "data:" ) ) {
+
+			return image.src;
+
+		} else if ( typeof HTMLCanvasElement == 'undefined' ) {
 
 
 			return image.src;
 			return image.src;