diff --git a/main/document/slideshow.php b/main/document/slideshow.php
index 5482c8a612..1b0e94ee6f 100644
--- a/main/document/slideshow.php
+++ b/main/document/slideshow.php
@@ -239,7 +239,13 @@ if ($slide_id == 'all') {
if(in_array($imagetype,$allowed_thumbnail_types)) {
if (!file_exists($image_thumbnail)){
$original_image_size = api_getimagesize($image);//run each once we view thumbnails is too heavy, then need move into !file_exists($image_thumbnail, and only run when haven't the thumbnail
-
+
+ if($max_thumbnail_width>$original_image_size['width'] || $max_thumbnail_height>$original_image_size['height']){
+ $doc_url = ($path && $path !== '/') ? $path.'/'.$one_image_file : $path.$one_image_file;
+ $image_tag[] = '
';
+ continue;
+ }
+
switch($imagetype) {
case 'gif':
$source_img = imagecreatefromgif($image);
@@ -300,9 +306,10 @@ if ($slide_id == 'all') {
}//end !exist thumbnail
//show thumbnail and link
+
$one_image_thumbnail_file='.thumbs/.'.$one_image_file;//get path thumbnail
$doc_url = ($path && $path !== '/') ? $path.'/'.$one_image_thumbnail_file : $path.$one_image_thumbnail_file;
- $image_tag[] = '
';
+ $image_tag[] = '
';
}
else{
//if images aren't support by gd (not gif, jpg, jpeg, png)
diff --git a/main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_thumbnail_listing.php b/main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_thumbnail_listing.php
index 7b7932b9ec..4d66d6def4 100644
--- a/main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_thumbnail_listing.php
+++ b/main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_thumbnail_listing.php
@@ -113,7 +113,13 @@ foreach ($fileList as $file) {
if (in_array($imagetype,$allowed_thumbnail_types)) {
if (!file_exists($image_thumbnail)) {
- $original_image_size = api_getimagesize($image);//run each once we view thumbnails is too heavy, then need move into !file_exists($image_thumbnail, and only run when haven't the thumbnail
+ $original_image_size = api_getimagesize($image);//run each once we view thumbnails is too heavy, then need move into !file_exists($image_thumbnail, and only run when haven't the thumbnail
+ if($max_thumbnail_width>$original_image_size['width'] || $max_thumbnail_height>$original_image_size['height']){
+ echo '
' . "\n";
+ continue;
+ }
+
+
switch ($imagetype) {
case 'gif':
$source_img = imagecreatefromgif($image);