diff --git a/index.js b/index.js index e2dee22..b4860f6 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,7 @@ module.exports = function() { resourcePath, destDir; - if (isAbsoluteUrl(url) || isRootRelativeUrl(url)) { + if (isAbsoluteUrl(url) || isRootRelativeUrl(url) || isBase64Url(url)) { return url; } @@ -62,3 +62,8 @@ function isAbsoluteUrl(url) { function isRootRelativeUrl(url) { return url.charAt(0) === '/'; } + +//skip base64 +function isBase64Url(url) { + return (/^data:image\//).test(url); +}