Limit minimum original image size for thumbnails of external images

cf. xpressengine/xe-core a4a54f9 by @bnu
Exclude external images less than 30% of the thumbnail size

TODO: Make the limit configurable
This commit is contained in:
Kijin Sung 2016-05-16 22:35:53 +09:00
parent f362d0e465
commit 78cbaea1a4
2 changed files with 8 additions and 0 deletions

View file

@ -682,6 +682,10 @@ class commentItem extends Object
if($is_img = @getimagesize($tmp_file))
{
list($_w, $_h, $_t, $_a) = $is_img;
if($_w < ($width * 0.3) && $_h < ($height * 0.3))
{
continue;
}
}
else
{