diff --git a/lib/client/view.js b/lib/client/view.js index b867cb22..1f51cde8 100644 --- a/lib/client/view.js +++ b/lib/client/view.js @@ -123,7 +123,8 @@ var CloudCmd, Util, DOM, CloudFunc, $; case 'image': config = Util.copyObj({ - autoSize : true + autoSize : true, + type : 'image' }, Config); $.fancybox.open(path, config); @@ -161,7 +162,17 @@ var CloudCmd, Util, DOM, CloudFunc, $; } function isImage(name) { - var isMatch = $.fancybox.isImage(name); + var isMatch; + + isMatch = Util.checkExt(name, [ + 'jp(e|g|eg)', + 'gif', + 'png', + 'bmp', + 'webp', + 'svg', + 'ico' + ]); return isMatch; }