diff --git a/html/view/image.html b/html/view/image.html
deleted file mode 100644
index 5bf60ab8..00000000
--- a/html/view/image.html
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/lib/client/view.js b/lib/client/view.js
index 6812086c..ae4a806e 100644
--- a/lib/client/view.js
+++ b/lib/client/view.js
@@ -84,11 +84,13 @@ var CloudCmd, Util, DOM, CloudFunc, $;
Images.showLoad();
path = CloudFunc.FS + Info.path;
- if (isImage(path))
- getImageElement(path, function(element) {
- $.fancybox.open(element, Config);
- });
- else if (isMusic(path))
+ if (isImage(path)) {
+ config = Util.copyObj({
+ autoSize: true
+ }, Config);
+
+ $.fancybox.open(path, config);
+ } else if (isMusic(path))
getMusicElement(path, function(element) {
$.fancybox.open(element, {
beforeShow: musicBeforeShow
@@ -128,24 +130,6 @@ var CloudCmd, Util, DOM, CloudFunc, $;
return isMatch;
}
- function getImageElement(src, callback) {
- CloudCmd.getTemplate(TemplateImage, 'view/image', function(template) {
- var rendered, element;
-
- if (!TemplateImage)
- TemplateImage = template;
-
- rendered = Util.render(TemplateImage, {
- src: src,
- name: Info.name
- });
-
- element = $(rendered);
-
- Util.exec(callback, element);
- });
- }
-
function getMusicElement(src, callback) {
CloudCmd.getTemplate(TemplateAudio, 'view/audio', function(template) {
var rendered, element;