diff --git a/js/viewimageresize.js b/js/viewimageresize.js index 7893ae45c..4336e11c5 100644 --- a/js/viewimageresize.js +++ b/js/viewimageresize.js @@ -21,16 +21,20 @@ var width = $this.width(); $img.each(function() { - $(this).removeAttr("width") - .removeAttr("height") - .css("width","") - .css("height", ""); - if($(this).data("width") == undefined) $(this).data("width", $(this).width()); if($(this).data("width") > width) { - $(this).css("width", "100%"); + $(this).removeAttr("width") + .removeAttr("height") + .css("width","") + .css("height", ""); + + if($(this).data("width") > width) { + $(this).css("width", "100%"); + } + } else { + $(this).attr("width", $(this).data("width")); } }); } diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index 31f4b7e7f..5920105d1 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -176,7 +176,7 @@ function get_view_thumbnail($contents, $thumb_width=0) // $img_tag에 editor 경로가 있으면 원본보기 링크 추가 $img_tag = $matches[0][$i]; if(strpos($img_tag, 'data/editor') && preg_match("/\.({$config['cf_image_extension']})$/i", $filename)) { - $imgurl = str_replace(G5_URL, "", $img_tag); + $imgurl = str_replace(G5_URL, "", $src); $thumb_tag = ''.$thumb_tag.''; }